ansible/dhall/Prelude/List/length.dhall

11 lines
253 B
Text
Raw Normal View History

2024-11-26 05:55:44 +00:00
--| 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