meta data for this page
Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
z0ne.maybe:start [2022-05-05 14:48] Kura |
z0ne.maybe:start [2022-05-05 14:50] Kura |
||
---|---|---|---|
Line 66: | Line 66: | ||
var d = maybe.Where(val => false); | var d = maybe.Where(val => false); | ||
- | // flatten | + | // collapse to the innermost |
var e = maybe.Flatten(); | var e = maybe.Flatten(); | ||
</ | </ | ||
Line 95: | Line 95: | ||
var d = maybe.UnwrapOrElse(() => 1); | var d = maybe.UnwrapOrElse(() => 1); | ||
- | // get the inner value, or create a new instance (only when the inner type is a class with a new() constructor) | + | // get the inner value, or create a new instance (only available |
var e = maybe.UnwrapOrNew(); | var e = maybe.UnwrapOrNew(); | ||
</ | </ |