Open haasn opened 13 years ago
I'm going to add this to the spec for now, can be revised later on if anybody has further input.
One thing I haven't though about how to deal with is mutual recursion / calling a parent function from a child function.
Recursion is currently not possible due to the way the system works - creating a function will not assign any name to that function, and even if we do so later on via >implying, it's not inside the closure at the time of the function's creation. Plus, it doesn't work with anonymous lambda functions.
So to resolve this, I propose a special form of function call, in which you reference “this”. Eg:
For example, a factorial function could look like this: