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