dhall-nix-lib/Optional/length.dhall

9 lines
228 B
Text
Raw Normal View History

2022-09-02 08:10:20 +00:00
λ(nix : ../NixPrelude.dhall) →
let fold = ./fold.dhall nix
let length
: ∀(a : Type) → Optional a → Natural
= λ(a : Type) → λ(xs : Optional a) → fold a xs Natural (λ(_ : a) → 1) 0
in length