Prelude-v16.0.0
head Natural [ 0, 1, 2 ] ≡ Some 0
head Natural ([] : List Natural) ≡ None Natural
{-Retrieve the first element of the list-}let head : ∀(a : Type) → List a → Optional a = List/headlet example0 = assert : head Natural [ 0, 1, 2 ] ≡ Some 0let example1 = assert : head Natural ([] : List Natural) ≡ None Naturalin head