Closed mattbierner closed 10 years ago
..
does not solve the case:
\x -> ...
\> g
where the programmer intended to compose the lambda with g
instead of creating a lambda whose body is composed with g
.
Current consideration is to use a special symbol that can stop lets and lambda from capturing (Something like Haskell's $
but Haskell's $
logic cannot be easily applied to ECMAScript).
Possibilities:
§
†
‡
One would write:
M.of(...)
.chain \ x -> ... §
.chain \ y -> ... §
Chaining expressions with Fantasy lands API currently requires parens on lambdas:
Specifically for the case of member access, or perhaps as a more general purpose solution, a way to limit the lambda capture so we could write
would be preferable.
Perhaps something like:
Where
..
has the lowest precedence.