dhall-nix-lib/List/length.dhall
2022-09-01 19:37:49 +01:00

10 lines
253 B
Text

--| Returns the number of elements in a list
let length
: ∀(a : Type) → List a → Natural
= List/length
let example0 = assert : length Natural [ 0, 1, 2 ] ≡ 3
let example1 = assert : length Natural ([] : List Natural) ≡ 0
in length