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.

  1. flip x f = f
  2. x -- NOT OKAY, Hamler will see x as a seperate declaration
  3. flip f x = f
  4. x -- OKAY, but not recommended

Let and Where Bindings

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

  1. distance x y = sqrt z
  2. where
  3. z = x' + y'
  4. x' = x * x
  5. y' = y * y