Maverick,
Do you mind tell what is mean by the symbol $ in this piece of
code? Thanks
a lot.
It denotes function application:
infixr 1 $
($) :: (a -> b) -> a -> b
f $ x = f x
Note how its precedence and associativity is the opposite of that of
'regular' function application. The ($) is typically used to limit
the number of parentheses needed in a piece of code:
f (g (h x)) vs. f $ g $ h $ x
There are other options though:
(f . g . h) x
f . g . h $ x
HTH,
Stefan
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe