haskellsyntaxoperatorsfunction-composition

What does a fullstop or period or dot (.) mean in Haskell?


I really wish that Google was better at searching for syntax:

decades         :: (RealFrac a) => a -> a -> [a] -> Array Int Int
decades a b     =  hist (0,9) . map decade
                   where decade x = floor ((x - a) * s)
                         s        = 10 / (b - a)

Solution

  • f(g(x))

    is

    in mathematics : f ∘ g (x)

    in haskell : ( f . g ) (x)