blob: 5f37f1360e8b57a8cafcd64497c5fa533f2ac838 [file] [edit]
def f (xs : List Nat) : Nat :=
match xs with
| [] => 0
| x::xs =>
match xs with
| [] => 0
-- This examples fails if we write the following alternative as
-- | _ => f xs + 1
| xs => f xs + 1
def g (xs : List Nat) : Nat :=
match xs with
| [] => 0
| y::ys =>
match ys with
| [] => 0
| _::_::zs => g zs + 1
| zs => g zs + 3