dhall-nix-lib/Optional/toList.dhall

7 lines
179 B
Text
Raw Normal View History

2022-09-01 18:37:49 +00:00
λ(nix : ../NixPrelude.dhall) →
let fold = ./fold.dhall nix
in λ(a : Type) →
λ(o : Optional a) →
fold a o (List a) (λ(v : a) → [ v ]) ([] : List a)