Closed nightruby-isa closed 1 year ago
Would love to have support for MapOrElse on Option to simplify option.Map(v => new Obj(v)).UnwrapOrElse(() => new Obj(fallback))
option.Map(v => new Obj(v)).UnwrapOrElse(() => new Obj(fallback))
Yeah, that's a legitimate shortcut. We got Option.MapOr, so Option.MapOrElse fits nicely - thanks alot!
Option.MapOr
Option.MapOrElse
Would love to have support for MapOrElse on Option to simplify
option.Map(v => new Obj(v)).UnwrapOrElse(() => new Obj(fallback))