FSharpPlus


Reader<'r, 't> Type

Computation type: Computations which read values from a shared environment.

Binding strategy: Monad values are functions from the environment to a value. The bound function is applied to the bound value, and both have access to the shared environment.

Useful for: Maintaining variable bindings, or other shared environment.

Table of contents

Functor

Static members

Static member Description

f <!> x

Full Usage: f <!> x

Parameters:
    f : 'T -> 'U
    x : Reader<'R, 'T>

Returns: Reader<'R, 'U>

Lifts a function into a Reader. Same as map. To be used in Applicative Style expressions, combined with <*>

f : 'T -> 'U
x : Reader<'R, 'T>
Returns: Reader<'R, 'U>

Applicative

Static members

Static member Description

x *> y

Full Usage: x *> y

Parameters:
Returns: Reader<'R, 'U>

Sequences two Readers left-to-right, discarding the value of the first argument.

x : Reader<'R, 'T>
y : Reader<'R, 'U>
Returns: Reader<'R, 'U>

x <* y

Full Usage: x <* y

Parameters:
Returns: Reader<'R, 'U>

Sequences two Readers left-to-right, discarding the value of the second argument.

x : Reader<'R, 'U>
y : Reader<'R, 'T>
Returns: Reader<'R, 'U>

Other module members

Union cases

Union case Description

Reader 'r -> 't

Full Usage: Reader 'r -> 't

Parameters:
    Item : 'r -> 't

Item : 'r -> 't

Static members

Static member Description

f <*> x

Full Usage: f <*> x

Parameters:
Returns: Reader<'R, 'U>
f : Reader<'R, ('T -> 'U)>
x : Reader<'R, 'T>
Returns: Reader<'R, 'U>

arg0 =>> f

Full Usage: arg0 =>> f

Parameters:
Returns: Reader<^Monoid, 'U>
Modifiers: inline
Type parameters: 'U
arg0 : Reader<^Monoid, 'T>
f : Reader<^Monoid, 'T> -> 'U
Returns: Reader<^Monoid, 'U>

x >>= f

Full Usage: x >>= f

Parameters:
Returns: Reader<'R, 'U>
x : Reader<'R, 'T>
f : 'T -> Reader<'R, 'U>
Returns: Reader<'R, 'U>

Reader.Delay(body)

Full Usage: Reader.Delay(body)

Parameters:
    body : unit -> Reader<'R, 'T>

Returns: Reader<'R, 'T>
body : unit -> Reader<'R, 'T>
Returns: Reader<'R, 'T>

Reader.Extract(arg1)

Full Usage: Reader.Extract(arg1)

Parameters:
Returns: 'T
Modifiers: inline
arg0 : Reader<^Monoid, 'T>
Returns: 'T

Reader.Lift2(f, x, y)

Full Usage: Reader.Lift2(f, x, y)

Parameters:
Returns: Reader<'R, 'V>
f : 'T -> 'U -> 'V
x : Reader<'R, 'T>
y : Reader<'R, 'U>
Returns: Reader<'R, 'V>

Reader.Lift3(f, x, y, z)

Full Usage: Reader.Lift3(f, x, y, z)

Parameters:
Returns: Reader<'R, 'W>
f : 'T -> 'U -> 'V -> 'W
x : Reader<'R, 'T>
y : Reader<'R, 'U>
z : Reader<'R, 'V>
Returns: Reader<'R, 'W>

Reader.Local(m, f)

Full Usage: Reader.Local(m, f)

Parameters:
    m : Reader<'R2, 'T>
    f : 'R1 -> 'R2

Returns: Reader<'R1, 'T>
m : Reader<'R2, 'T>
f : 'R1 -> 'R2
Returns: Reader<'R1, 'T>

Reader.Map(x, f)

Full Usage: Reader.Map(x, f)

Parameters:
    x : Reader<'R, 'T>
    f : 'T -> 'U

Returns: Reader<'R, 'U>
x : Reader<'R, 'T>
f : 'T -> 'U
Returns: Reader<'R, 'U>

Reader.Return(x)

Full Usage: Reader.Return(x)

Parameters:
    x : 'T

Returns: Reader<'R, 'T>
x : 'T
Returns: Reader<'R, 'T>

Reader.TryFinally(arg1, f)

Full Usage: Reader.TryFinally(arg1, f)

Parameters:
    arg0 : Reader<'a, 'b>
    f : unit -> unit

Returns: Reader<'a, 'b>
arg0 : Reader<'a, 'b>
f : unit -> unit
Returns: Reader<'a, 'b>

Reader.TryWith(arg1, h)

Full Usage: Reader.TryWith(arg1, h)

Parameters:
Returns: Reader<'R, 'T>
arg0 : Reader<'R, 'T>
h : exn -> Reader<'R, 'T>
Returns: Reader<'R, 'T>

Reader.Using(resource, f)

Full Usage: Reader.Using(resource, f)

Parameters:
    resource : 'a
    f : 'a -> Reader<'R, 'T>

Returns: Reader<'R, 'T>
resource : 'a
f : 'a -> Reader<'R, 'T>
Returns: Reader<'R, 'T>

Reader.Zip(x, y)

Full Usage: Reader.Zip(x, y)

Parameters:
Returns: Reader<'a, ('b * 'c)>
x : Reader<'a, 'b>
y : Reader<'a, 'c>
Returns: Reader<'a, ('b * 'c)>

Reader.get_Ask ()

Full Usage: Reader.get_Ask ()

Returns: Reader<'R, 'R>
Returns: Reader<'R, 'R>