
4 Dec
2007
4 Dec
'07
8:47 a.m.
|> is not defined in the prelude but can be defined as let (|>) = flip ($) to make it the opposite of $ which means the syntax looks more like the Unix pipe '|' command eg. filter (\x-> x >3 && x < 7) $ [1..10] ++ [5] [1..10] ++ [5] |> filter (\x-> x >3 && x < 7) res: [4,5,6] note that with the |> the function applications are read as naturally left to right as apposed to the $ which reads left to right. a style more in line with the syntax f (x) ____________________________________________________________________________________ Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs
6425
Age (days ago)
6425
Last active (days ago)
0 comments
1 participants
participants (1)
-
Alan Hawkins