Is there a way to distribute an array to different argument positions in a function?

Note that you want to be careful with splatting large arrays, because contrary to Python, Julia usually specializes on positional and keyword arguments, so if the array you are splatting is large, compile time latency can get out of hand quite quickly. Splatting typically works best for relatively small tuples, because tuples are always statically sized and always contain all the type information the Julia compiler needs to generate efficient code. In these cases, splatting is often free at runtime, which can be really useful.

6 Likes