Applies a function to the stored value if there is one.
<beman/optional/optional.hpp>
template<class F>
constexpr
optional<std::invoke_result_t<F, T&>>
transform(F&& f) const;
The return type is the same as
{std::invoke_result_t<F, T&>},
but wrapped in an optional.