[Haskell-beginners] function application
Francesco Ariis
fa-ml at ariis.it
Sun Apr 10 17:11:55 UTC 2016
On Sun, Apr 10, 2016 at 05:16:24PM +0100, mike h wrote:
> So is
> mc . mc $ x + 11
>
> the only correct way to write this particular function in ‘.’ style ?
Hello Mike,
(mc . mc) (x + 11)
would do too.
Remember, function application (white-space) takes precedence over
*everything*, so:
mc . mc ( x + 11 )
^ ^
| +------- whitespace
|
+----------- operator
is the same as:
mc . (mc ( x + 11 ))
More information about the Beginners
mailing list