Notes On Indentations

Notes On Indentations

Like all ML Language Family, Hamler is indentation sensitive. Any declaration in the same block should have the same level of indentation. In the case of a declaration spans more than one line, the other lines have to be intended past the first line.

flip x f = f
x                   -- NOT OKAY, Hamler will see x as a seperate declaration

flip f x = f
    x               -- OKAY, but not recommended

Let and Where Bindings

Keywords such as Let and Where introduces a new block, where further indentation is needed.

distance x y = sqrt z
  where
    z = x' + y'
    x' = x * x
    y' = y * y