assert(Optional!int.some(3).fmap!(n => n + 7) == 10.some); import std.algorithm: equal, map; import std.range : only; assert(Optional!int.some(3).only.map!(fmap!(n => n + 7)).equal(10.some.only));
See Implementation