[Haskell-beginners] Function Composition

Shishir Srivastava shishir.srivastava at gmail.com
Wed May 13 21:12:21 UTC 2015


Hi,

Could someone please point out what is the difference between using $ and
parenthesis in the function composition below. Why does the first
expression work whereas the second fails.
---
$$ head.head$[[1,2],[3,4]]
1
$$ head.head([[1,2],[3,4]])

<interactive>:122:12:
    Couldn't match expected type ‘a -> [c]’ with actual type ‘[t0]’
    Relevant bindings include
---
Thanks,
Shishir
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20150513/221e5395/attachment.html>


More information about the Beginners mailing list