method K<F, A> mutate <F, Env, A> (Func<A, A> f) Source #
where
F : Functor<F>
where
Env : Mutates<F, A>
Mutate an atomic value in an environment
type | F | Readable & Monad trait |
type | Env | Environment type |
type | A | Type of the value to read from the environment |
param | f | Function to mapping the value atomically |
returns | Result of mutation, or original value if the underlying Atom's validator failed |