I would like to define a struct where one of the field is a function. But I would also like to control the arguments and return type of that fonction. For the sake of the example, let say that function would match this signature :
::Int -> ::Float64
Currently I use the following struct that is too permissive to my taste
struct MyType my_function::Function end Is there any way to inforce the signature of `my_function` in Julia (v0.6)?