Functions as a first class citizens #5651
Replies: 2 comments
-
For this specific case, the proposal document for
I guess we will have lambda and the ordinary function coercion later. |
Beta Was this translation helpful? Give feedback.
-
Just to echo what Jay said, this is indeed a desirable feature but it is only informally planned. I created #5784 though I don't know when the feature will be added. |
Beta Was this translation helpful? Give feedback.
-
Consider a simple example of higher order function:
Playground Link
I think it would be better if a free function could conform to the
IFunc
interface, even if it requires introducing an anonymous type during specialization. Currently,add_free_function
is of type(float, float) -> float
according to the compilation error, but this type is not directly usable.Beta Was this translation helpful? Give feedback.
All reactions