A functor that safely applies transformations to a value, preventing errors while allowing type changes.
The initial value.
A CanApply<T> instance.
CanApply<T>
const result = CanApply(5) .map(x => x * 2) // 10 .map(x => x.toString()) // "10" .getValue();console.log(result); // "10" Copy
const result = CanApply(5) .map(x => x * 2) // 10 .map(x => x.toString()) // "10" .getValue();console.log(result); // "10"
A functor that safely applies transformations to a value, preventing errors while allowing type changes.