meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

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 the (nested) value (if maybe's are nested just return the inner most maybe)+// collapse to the innermost value (if maybe's are nested just return the inner most maybe)
 var e = maybe.Flatten(); var e = maybe.Flatten();
 </code> </code>
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 when the inner type is a class with a new() constructor)
 var e = maybe.UnwrapOrNew(); var e = maybe.UnwrapOrNew();
 </code> </code>