Bikeshedding mapslices

Yes, that’s the right way to implement mapslices. Nice work! The only thing I see to complain about is the fact that with true/false, it’s hard to remember which is which. I find myself leaning towards mapslices(f, A, (:, *, :)) for a 3-dimensional A being equivalent to mapslices(f, A, [1, 3]). The reasoning is that “dims is where the colons go” so you might as well use : directly. The * indicates that this slot is to be replaced by a value, meant to be reminiscent of a wildcard search. I’m less thrilled about * than :, but I haven’t yet thought of anything better.

Of course you can “translate” (essentially for free) into Val{true}()/Val{false}() in your internal implementation, this is just about the user-facing API.