LanguageExt.Core

LanguageExt.Core Traits Mutates

Contents

class Mutates Source #

Methods

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

Parameters

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

interface Mutates <in M, InnerEnv> Source #

where M : Functor<M>

Makes an atomic value within an environment available for mutation

Parameters

type M

Structure trait

type InnerEnv

The value extracted from an environment

Properties

property K<M, Atom<InnerEnv>> Mutable Source #

Extracts the A from the Env, passes it to the f mapping functions, and then wraps it back up into the generic M〈Unit〉 type.

Parameters

param f

Mapping function

returns

Mapped value