3 ms·
Interesting language. The comprehensions are a neat feature and similar to Python in syntax. No support for ternary or assignment operators. The lambda syntax i
by mimg 10y ago
Interesting language. The comprehensions are a neat feature and similar to Python in syntax. No support for ternary or assignment operators. The lambda syntax is not very intuitive if you have no arguments and more than one statement to execute.
let e1 = {
return "e1 called!"
}
let e2 = -> {
return "e2 called!"
}
e1() has expected behavior but e2() does not and e2()() has expected behavior. Not sure why?
- david-given 10y agoJust from looking at your example here, and not looking at the docs, I'd say that `{x}` and `-> x` both return a function which evaluates `x` and returns the result; so `-> {x}` is equivalent to `{{x}}`, i.e. it returns a function which returns a function which returns `x`.