Personal tools

Direction of data flow

From HaskellWiki

(Difference between revisions)
Jump to: navigation, search
(translated table from the german page)
(let vs. where)

Latest revision as of 11:49, 20 March 2007

In Haskell the direction of data flow symbolized by the notations differs amongst the notations. Both directions occur equally frequently:

from left to right:

function definition
 f x = x*x
(input left, output right)
 \ x -> x*x
do notation
 do f; g
monadic composition
 f >>= g
let expression
 let x = 2 in x*x
(first definition, then usage)

from right to left:

function application
 f x
 f $ x
(input right, applied function left)
 g . f
results of monads
 do x <- f
monadic composition
 g =<< f
where clause
 x*x where x = 2
(first usage, then definition)

[edit] 1 Weblinks

[edit] 2 See also

There is still something to translate from De/Flussrichtung