mail at joachim-breitner.de
Fri Jul 8 07:09:51 UTC 2016
Am Freitag, den 08.07.2016, 08:35 +0200 schrieb Sven Panne:
> do f &&& g
> Should the x now be an argument of foobar (as it is currently) or the
> "do"? If it is not an argument of the "do", suddenly things get very
> context-dependent. Computers are good at handling context-dependent
> things, humans are quite bad at it.
What do you mean by “as it is currently”. Currently, this is a syntax
error! (“parse error on input ‘do’”).
Only with the proposed addition, it becomes an argument to foobar.
And it is not hard to reason about this: "x" is lined up with the "do",
so it is a sibling, not a child, in the AST. Hence, both are arguments
This is another good instance of how the (by me) beloved feature of
“parenthesless arguments”, which so far is only available for the last
argument of a function (using the “$” idiom), would now be possible for
every argument of a function.
Joachim “nomeata” Breitner
mail at joachim-breitner.de • https://www.joachim-breitner.de/
XMPP: nomeata at joachim-breitner.de • OpenPGP-Key: 0xF0FBF51F
Debian Developer: nomeata at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 819 bytes
Desc: This is a digitally signed message part
More information about the Glasgow-haskell-users