I’m trying to write a function that will accept an argument that implements the
AbstractArray interface. I’m finding that I need to write one implementation for mutable
AbstractArrays and another for immutable
AbstractArrays. I see the
isimmutable function, but after experimenting, it seems that it doesn’t get optimized away at compile time as I hoped it would.
What is the right way to have separate implementations for mutable and immutable objects?