f $ x = f x(f . g) x = f (g x)-- Some quick examples of using these. The following line...putStrLn (take 12 (map foo (bar ++ "ack")))-- ...can be rewritten as...putStrLn $ take 12 $ map foo $ bar ++ "ack"(putStrLn . take 12 . map foo) (bar ++ "ack")putStrLn . take 12 . map foo $ bar ++ "ack"
In terms of good Haskell style, the last example above is preferable to the
others. By the way, note that ($) has the lowest precedence (zero)
of any operator, so you can almost always use arbitrary syntax on either side of
it.
Group items matching
in title, tags, annotations or url
1 - 3 of 3
Showing 20▼ items per page