5 ms·
> where a value can be wrapped in a trivial way (e.g. x -> {x} or x -> x?) > and a double wrapping can be trivially unwrapped (“naturally transformed”) into a
by nybble41 5y ago
> where a value can be wrapped in a trivial way (e.g. x -> {x} or x -> x?)
> and a double wrapping can be trivially unwrapped (“naturally transformed”) into a single one: {{xyz}} -> {xyz}
You've described the "pure" and "join" operations (in Haskell terms), which are two of the three requirements for a monad. The third and final requirement is that there must be a way to lift an arbitrary function on plain values to work on "wrapped" values: (x → y) → ({x} → {y}).