Functions as a first class citizens #5651
igor-elovikov
started this conversation in
Slang Proposed Features (SPFs)
Replies: 1 comment
-
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.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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