cast ubyte[] to const(ubyte)[]

casting to mutable makes the compiler complain during CTFE, if the elements are passed by reference, even if no actual mutation occurs. const is more correct anyways.
make *naryFun take by auto ref