Dict issue?

Firstly, you are using the same name, f, for both the outer function and the function retrieved from the Dict. I’m not sure if that causes any problems, but it’s confusing and not a good idea, imho.

Secondly, Julia doesn’t know which function is coming out of your Dict. It just knows it’s some function, any function, and therefore it cannot predict what the types of the outputs will be. It doesn’t matter that you name the outputs vex, vey, vez, there’s no way to know that they have anything to do with the function velo_func.

Will data["rigid_body_velo"] contain many functions or just one?

1 Like