// source: https://doc.rust-lang.org/std/option/enum.Option.html#method.or_else alias O = Optional!string; auto nobody = function O() => none; auto vikings = function O() => "vikings".some; assert(O.some("barbarians").orElse!vikings == "barbarians".some); assert(O.none.orElse!vikings == "vikings".some); assert(O.none.orElse!nobody == none);