Converts a range or Nullable to an optional type
the range to convert. It must have no more than 1 element
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