Source/Packages

Std.Foundation

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

325 lines52 declarations11.6 KiBSHA-256 3dcbd3fa87ff

def · lines 225–234

stdOptionValueOr

Full file
The value an option holds, or the supplied default. The element type is explicit, because the library never guesses a type.
225def stdOptionValueOr =
226  (lambda erased element : Type 0 .
227    unrestricted fallback : element .
228    unrestricted value : (family StdOption element) .
229    eliminate
230      StdOption
231      (lambda unrestricted current : (family StdOption element) . element)
232      value
233      (branch StdNone . fallback)
234      (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.