Function definitions inside functions #703
KristianBalaj
started this conversation in
Core language features
Replies: 1 comment 1 reply
-
funny enough we just added a recursion optimization to do this automatically for static params. As for defining functions in functions, that conflicts with another feature we are working on, so the discussion would have to wait till after that feature is out. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What is your idea? Provide a use case.
I'd like to be able to do the following:
This makes the most sense to me when the
bar
is a recursive function and I don't want to pass the same parameter over and over again. Take the following example for exaplanation:Currently, I have to do this the following:
The only workaround currently is to define a function in a function the following way:
but the
bar
can't be recursive in this case AFAIK.Beta Was this translation helpful? Give feedback.
All reactions