On haskell.org I came across this point free style function, dubbed "the owl".
((.)$(.))
Its type signature is
(a -> b -> c) -> a -> (a1 -> b) -> a1 -> c
.
It's equivalent to
f a b c d = a b (c d)
and apparently,
((.)$(.)) (==) 1 (1+) 0
returns True
.
So my questions are:
- What does the
a1
in the type signature mean? Is it related toa
? - Is
(==)
some kind of function equality operator? Because0 (==) 0
throws an error in GHCi. - What does
1 (1+) 0
mean in this context? I don't see how this is even a valid expression. - Why does the expression return
True
?
$
in((.)$(.))
is unnecessary; the expression((.)(.))
is completely equivalent. – Chris Taylor Jul 12 '13 at 7:53