FSharpPlus


Identity<'t> Type

Computation type: Simple function application.

Binding strategy: The bound function is applied to the input value. Identity x >>= f = Identity (f x)

Useful for: Lens setters and updaters - Monads can be derived from monad transformers applied to the Identity monad.

The Identity monad is a monad that does not embody any computational strategy. It simply applies the bound function to its input without any modification. Computationally, there is no reason to use the Identity monad instead of the much simpler act of simply applying functions to their arguments. The purpose of the Identity monad is its fundamental role in the theory of monad transformers. Any monad transformer applied to the Identity monad yields a non-transformer version of that monad. Its applicative instance plays a fundamental role in Lens.

Table of contents

Monad

Static members

Static member Description

f >=> g

Full Usage: f >=> g

Parameters:
Returns: 'T -> Identity<'V>

Composes left-to-right two Id functions (Kleisli composition).

f : 'T -> Identity<'U>
g : 'U -> Identity<'V>
Returns: 'T -> Identity<'V>

Other module members

Union cases

Union case Description

Identity 't

Full Usage: Identity 't

Parameters:
    Item : 't

Item : 't

Static members

Static member Description

arg0 <*> arg1

Full Usage: arg0 <*> arg1

Parameters:
Returns: Identity<'U>
arg0 : Identity<('T -> 'U)>
arg1 : Identity<'T>
Returns: Identity<'U>

arg0 >>= f

Full Usage: arg0 >>= f

Parameters:
Returns: Identity<'U>
arg0 : Identity<'T>
f : 'T -> Identity<'U>
Returns: Identity<'U>

Identity.Lift2(f, arg2, arg3)

Full Usage: Identity.Lift2(f, arg2, arg3)

Parameters:
Returns: Identity<'V>
f : 'T -> 'U -> 'V
arg1 : Identity<'T>
arg2 : Identity<'U>
Returns: Identity<'V>

Identity.Lift3(f, arg2, arg3, arg4)

Full Usage: Identity.Lift3(f, arg2, arg3, arg4)

Parameters:
Returns: Identity<'W>
f : 'T -> 'U -> 'V -> 'W
arg1 : Identity<'T>
arg2 : Identity<'U>
arg3 : Identity<'V>
Returns: Identity<'W>

Identity.Map(arg1, f)

Full Usage: Identity.Map(arg1, f)

Parameters:
Returns: Identity<'U>
arg0 : Identity<'T>
f : 'T -> 'U
Returns: Identity<'U>

Identity.Return(x)

Full Usage: Identity.Return(x)

Parameters:
    x : 'T

Returns: Identity<'T>
x : 'T
Returns: Identity<'T>

Identity.Zip(arg1, arg2)

Full Usage: Identity.Zip(arg1, arg2)

Parameters:
Returns: Identity<'T * 'U>
arg0 : Identity<'T>
arg1 : Identity<'U>
Returns: Identity<'T * 'U>