13 lines
314 B
Text
13 lines
314 B
Text
λ(nix : ../NixPrelude.dhall) →
|
|
let identity = ../Function/identity.dhall
|
|
|
|
let fold = ./fold.dhall nix
|
|
|
|
let default
|
|
: ∀(a : Type) → a → Optional a → a
|
|
= λ(a : Type) →
|
|
λ(default : a) →
|
|
λ(o : Optional a) →
|
|
fold a o a (identity a) default
|
|
|
|
in default
|