I think there’s some progress here, but it’s still not quite working. To use your suggestion I had to change my `_swap2!`

function to take 2 arguments instead of 1. Before I was creating adjacent, overlapping, pairs through the array comprehension calls. The new change created two new problems:

- The inputs to
`_swap2`

are now scalars so the changes are not being propagated outside the function - view seems to drop singleton dimensions and Julia inplace functions don’t seem to work on single values.
- I’m now getting same
`ERROR: scalar getindex is disallowed`

but on the `map`

call itself. This was what led me to that unsafe single array interface to `_swap2!`

originally.

```
function evenoddsort!(x::AbstractArray)
N = length(x)
steps = ceil(Integer, N / 2)
odds = view(x, 1:2:N)
evens = view(x, 2:2:N)
for i = 1:steps
# odd
map(_swap2!, odds[1:floor(Integer, N / 2)], evens) # if even, this is okay, if odd drop first odd
# even
map(_swap2!, evens[1:(steps-1)], odds[2:end])
end
return nothing
end
function _swap2!(a, b)
if a > b
a, b = b, a
end
return nothing
end
```