[Haskell-beginners] Function composition with more than 1 parameter

John Dorsey haskell at colquitt.org
Sat Oct 25 09:20:58 EDT 2008


Glurk,

"(.) . (.)" seems to do it:

dorsey at elwood:~$ ghci
GHCi, version 6.8.3: http://www.haskell.org/ghc/  :? for help
Loading package base ... linking ... done.
Prelude> let (...) = (.) . (.)
Prelude> let matches x xs = [ m | m <- xs, x == m ]
Prelude> :t length ... matches
length ... matches :: (Eq a) => a -> [a] -> Int
Prelude> 

Regards,
John



More information about the Beginners mailing list