Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Type Aliases

import Lait
#lait

We can create type aliases with the following syntax:

type Foo := Int * Int

def getFirst (f : Foo) := fst f

Type aliases can be parameterized as well:

type Pair<a, b> := a * b
def Pair.fst (p : Pair<a, b>) : a := fst p