Converts a range or Nullable to an optional type
the Nullable to convert
an optional of the element of range or Nullable
import std.algorithm: map; import optional; assert(no!int.map!"a".toOptional == none); assert(some(1).map!"a".toOptional == some(1));
See Implementation
Converts a range or Nullable to an optional type