Ok, great! Since I have an expert here, to get constant propagation to work recursively, I need to define my own tail function:
Base.@pure argtail(x, rest...) = rest
tail(x) = argtail(x...)
Again, a @pure
annotation is necessary here, even though argtail
seems very pure.