Source/Packages

Std.Foundation

packages/foundation/standard/src/Std/Foundation.alpha

329 lines52 declarations12.3 KiBSHA-256 7818c29d5c7c

def · lines 231–240

stdOptionValueOr

Full file
The value an option holds, or the supplied default. The element type is explicit, because the library never guesses a type.
231def stdOptionValueOr =
232  (lambda erased element : Type 0 .
233    (lambda unrestricted fallback : element .
234      (lambda unrestricted value : (family StdOption element) .
235        (eliminate
236          StdOption
237          (lambda unrestricted current : (family StdOption element) . element)
238          value
239          (branch StdNone . fallback)
240          (branch StdSome held . held)))))

The compiler supplied declaration spans and resolved links from this source snapshot. This page does not assert that this file belongs to a checked closure.