Proper way to define functions with additional parameters

Thanks for the feedback. I get that there is nothing non “julian” with anonymous functions. However, I did run into broadcast over CuArray problems if the parameters are not explicitly constant, even though they come from an immutable struct, as this post indicates. Wondering if there is a way though …