I started hugging him around, but rather wanted to use it for simple situations in which I can essentially pass values โโfrom one output to one input. A simple example of a convenient composition with which I am comfortable would be:
let joinLines = foldr (++) "" . intersperse "\n"
During play time with GHCI today I wanted to see if I can create notand (==)to replicate (/=), but I could not explain it. (==)take two entrances, but notone. I thought this might work:
let ne = not . (==)
With the assumption that single output Bool (==)will go to not, but it will not compile, citing the following error:
<interactive>:1:16:
Couldn't match expected type `Bool' with actual type `a0 -> Bool'
Expected type: a0 -> Bool
Actual type: a0 -> a0 -> Bool
In the second argument of `(.)', namely `(==)'
In the expression: not . (==)
, , , , , , , , (==), - not? - ?