FSharpPlus


Operators Module

Generic functions and operators

Table of contents

Nested modules

Modules Description

Arrows

Additional operators for Arrows related functions which shadows some F# operators for bitwise functions.

Seq

Common Combinators

Functions and values

Function or value Description

/>x

Full Usage: />x

Parameters:
    x : 'c -> 'd -> 'e

Returns: 'd -> 'c -> 'e
Modifiers: inline
Type parameters: 'c, 'd, 'e

Turn a function into something that looks like an operator. See Functions as operators.

x : 'c -> 'd -> 'e
Returns: 'd -> 'c -> 'e

</x

Full Usage: </x

Parameters:
    x : 'a

Returns: ('a -> 'b) -> 'b
Modifiers: inline
Type parameters: 'a, 'b

Turn a function into something that looks like an operator. See Functions as operators.

x : 'a
Returns: ('a -> 'b) -> 'b

curry f x y

Full Usage: curry f x y

Parameters:
    f : 'T1 * 'T2 -> 'Result
    x : 'T1
    y : 'T2

Returns: 'Result
Modifiers: inline
Type parameters: 'T1, 'T2, 'Result

Takes a function expecting a tuple of two elements and returns a function expecting two curried arguments.

f : 'T1 * 'T2 -> 'Result
x : 'T1
y : 'T2
Returns: 'Result

curryN f t

Full Usage: curryN f t

Parameters:
    f : ^T1*^T2*...*^Tn -> 'Result
    t : 'T1

Returns: 'T2->...->'Tn->'Result
Modifiers: inline
Type parameters: ^T1 * ^T2 * ... * ^Tn, 'Result, 'T1, 'T2 -> ... -> 'Tn -> 'Result

Takes a function expecting a tuple of any N number of elements and returns a function expecting N curried arguments.

f : ^T1*^T2*...*^Tn -> 'Result
t : 'T1
Returns: 'T2->...->'Tn->'Result

either fOk fError source

Full Usage: either fOk fError source

Parameters:
    fOk : 'T -> 'U - Function to be applied to source, if it contains an Ok value.
    fError : 'Error -> 'U - Function to be applied to source, if it contains an Error value.
    source : Result<'T, 'Error> - The source value, containing an Ok or an Error.

Returns: 'U The result of applying either functions.
Modifiers: inline
Type parameters: 'T, 'U, 'Error

Extracts a value from either side of a Result.

fOk : 'T -> 'U

Function to be applied to source, if it contains an Ok value.

fError : 'Error -> 'U

Function to be applied to source, if it contains an Error value.

source : Result<'T, 'Error>

The source value, containing an Ok or an Error.

Returns: 'U

The result of applying either functions.

flip f x y

Full Usage: flip f x y

Parameters:
    f : 'V -> 'T -> 'Result
    x : 'T
    y : 'V

Returns: 'Result
Modifiers: inline
Type parameters: 'V, 'T, 'Result

Creates a new function with first two arguments flipped.

f : 'V -> 'T -> 'Result
x : 'T
y : 'V
Returns: 'Result

konst k arg2

Full Usage: konst k arg2

Parameters:
    k : 'T - The constant value.
    arg1 : 'Ignored

Returns: 'T The constant value function.
Modifiers: inline
Type parameters: 'T, 'Ignored

Creates a constant function.

k : 'T

The constant value.

arg1 : 'Ignored
Returns: 'T

The constant value function.

option f n _arg1

Full Usage: option f n _arg1

Parameters:
    f : 'g -> 'h
    n : 'h
    _arg1 : 'g option

Returns: 'h
Modifiers: inline
Type parameters: 'g, 'h

Takes a function, a default value and a option value. If the option value is None, the function returns the default value. Otherwise, it applies the function to the value inside Some and returns the result.

f : 'g -> 'h
n : 'h
_arg1 : 'g option
Returns: 'h

tap f x

Full Usage: tap f x

Parameters:
    f : 'T -> unit
    x : 'T

Returns: 'T

Executes a side-effect function and returns the original input value.

f : 'T -> unit
x : 'T
Returns: 'T

tuple2 t1 t2

Full Usage: tuple2 t1 t2

Parameters:
    t1 : 'T1
    t2 : 'T2

Returns: 'T1 * 'T2
Modifiers: inline
Type parameters: 'T1, 'T2

Tuple two arguments

t1 : 'T1
t2 : 'T2
Returns: 'T1 * 'T2

tuple3 t1 t2 t3

Full Usage: tuple3 t1 t2 t3

Parameters:
    t1 : 'T1
    t2 : 'T2
    t3 : 'T3

Returns: 'T1 * 'T2 * 'T3
Modifiers: inline
Type parameters: 'T1, 'T2, 'T3

Tuple three arguments

t1 : 'T1
t2 : 'T2
t3 : 'T3
Returns: 'T1 * 'T2 * 'T3

tuple4 t1 t2 t3 t4

Full Usage: tuple4 t1 t2 t3 t4

Parameters:
    t1 : 'T1
    t2 : 'T2
    t3 : 'T3
    t4 : 'T4

Returns: 'T1 * 'T2 * 'T3 * 'T4
Modifiers: inline
Type parameters: 'T1, 'T2, 'T3, 'T4

Tuple four arguments

t1 : 'T1
t2 : 'T2
t3 : 'T3
t4 : 'T4
Returns: 'T1 * 'T2 * 'T3 * 'T4

tuple5 t1 t2 t3 t4 t5

Full Usage: tuple5 t1 t2 t3 t4 t5

Parameters:
    t1 : 'T1
    t2 : 'T2
    t3 : 'T3
    t4 : 'T4
    t5 : 'T5

Returns: 'T1 * 'T2 * 'T3 * 'T4 * 'T5
Modifiers: inline
Type parameters: 'T1, 'T2, 'T3, 'T4, 'T5

Tuple five arguments

t1 : 'T1
t2 : 'T2
t3 : 'T3
t4 : 'T4
t5 : 'T5
Returns: 'T1 * 'T2 * 'T3 * 'T4 * 'T5

tuple7 t1 t2 t3 t4 t5 t6 t7

Full Usage: tuple7 t1 t2 t3 t4 t5 t6 t7

Parameters:
    t1 : 'T1
    t2 : 'T2
    t3 : 'T3
    t4 : 'T4
    t5 : 'T5
    t6 : 'T6
    t7 : 'T7

Returns: 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7
Modifiers: inline
Type parameters: 'T1, 'T2, 'T3, 'T4, 'T5, 'T6, 'T7

Tuple seven arguments

t1 : 'T1
t2 : 'T2
t3 : 'T3
t4 : 'T4
t5 : 'T5
t6 : 'T6
t7 : 'T7
Returns: 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7

tuple8 t1 t2 t3 t4 t5 t6 t7 t8

Full Usage: tuple8 t1 t2 t3 t4 t5 t6 t7 t8

Parameters:
    t1 : 'T1
    t2 : 'T2
    t3 : 'T3
    t4 : 'T4
    t5 : 'T5
    t6 : 'T6
    t7 : 'T7
    t8 : 'T8

Returns: 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8
Modifiers: inline
Type parameters: 'T1, 'T2, 'T3, 'T4, 'T5, 'T6, 'T7, 'T8

Tuple eight arguments

t1 : 'T1
t2 : 'T2
t3 : 'T3
t4 : 'T4
t5 : 'T5
t6 : 'T6
t7 : 'T7
t8 : 'T8
Returns: 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6 * 'T7 * 'T8

uncurry f (x, y)

Full Usage: uncurry f (x, y)

Parameters:
    f : 'T1 -> 'T2 -> 'Result
    x : 'T1
    y : 'T2

Returns: 'Result
Modifiers: inline
Type parameters: 'T1, 'T2, 'Result

Takes a function expecting two curried arguments and returns a function expecting a tuple of two elements. Same as (<||).

f : 'T1 -> 'T2 -> 'Result
x : 'T1
y : 'T2
Returns: 'Result

uncurryN f t

Full Usage: uncurryN f t

Parameters:
    f : 'T1 -> 'T2->...->'Tn->'Result
    t : ^T1*^T2*...*^Tn

Returns: 'Result
Modifiers: inline
Type parameters: 'T1, 'T2 -> ... -> 'Tn -> 'Result, ^T1 * ^T2 * ... * ^Tn, 'Result

Takes a function expecting any N number of curried arguments and returns a function expecting a tuple of N elements.

f : 'T1 -> 'T2->...->'Tn->'Result
t : ^T1*^T2*...*^Tn
Returns: 'Result

Functor

Functions and values

Function or value Description

f <!> x

Full Usage: f <!> x

Parameters:
    f : 'T -> 'U
    x : ^Functor<'T>

Returns: ^Functor<'U>
Modifiers: inline
Type parameters: 'T, 'U, ^Functor<'T>, ^Functor<'U>

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

f : 'T -> 'U
x : ^Functor<'T>
Returns: ^Functor<'U>

f <<| x

Full Usage: f <<| x

Parameters:
    f : 'T -> 'U
    x : ^Functor<'T>

Returns: ^Functor<'U>
Modifiers: inline
Type parameters: 'T, 'U, ^Functor<'T>, ^Functor<'U>

Lifts a function into a Functor. Same as map.

f : 'T -> 'U
x : ^Functor<'T>
Returns: ^Functor<'U>

x |>> f

Full Usage: x |>> f

Parameters:
    x : ^Functor<'T>
    f : 'T -> 'U

Returns: ^Functor<'U>
Modifiers: inline
Type parameters: ^Functor<'T>, ^Functor<'U>, 'T, 'U

Lifts a function into a Functor. Same as map but with flipped arguments. To be used in pipe-forward style expressions

x : ^Functor<'T>
f : 'T -> 'U
Returns: ^Functor<'U>

iter action source

Full Usage: iter action source

Parameters:
    action : 'T -> unit
    source : ^Functor<'T>

Modifiers: inline
Type parameters: 'T, ^Functor<'T>

Like map but ignoring the results.

action : 'T -> unit
source : ^Functor<'T>

map f x

Full Usage: map f x

Parameters:
    f : 'T -> 'U
    x : ^Functor<'T>

Returns: ^Functor<'U>
Modifiers: inline
Type parameters: 'T, 'U, ^Functor<'T>, ^Functor<'U>

Lifts a function into a Functor.

f : 'T -> 'U
x : ^Functor<'T>
Returns: ^Functor<'U>

unzip source

Full Usage: unzip source

Parameters:
    source : ^Functor<'T1*'T2>

Returns: 'Functor<'T1> * 'Functor<'T2>
Modifiers: inline
Type parameters: ^Functor<'T1 * 'T2>, 'Functor<'T1>, 'Functor<'T2>

Un-zips (un-tuple) two functors.

source : ^Functor<'T1*'T2>
Returns: 'Functor<'T1> * 'Functor<'T2>

zip source1 source2

Full Usage: zip source1 source2

Parameters:
    source1 : ^ZipFunctor<'T1>
    source2 : ^ZipFunctor<'T2>

Returns: ^ZipFunctor<'T1*'T2>
Modifiers: inline
Type parameters: ^ZipFunctor<'T1>, ^ZipFunctor<'T2>, ^ZipFunctor<'T1 * 'T2>

Zips (tuple) two functors.

For collections, if one collection is shorter, excess elements are discarded from the right end of the longer collection.

source1 : ^ZipFunctor<'T1>
source2 : ^ZipFunctor<'T2>
Returns: ^ZipFunctor<'T1*'T2>

Applicative

Functions and values

Function or value Description

x *> y

Full Usage: x *> y

Parameters:
    x : ^Applicative<'T>
    y : ^Applicative<'U>

Returns: ^Applicative<'U>
Modifiers: inline
Type parameters: ^Applicative<'T>, ^Applicative<'U->'U>, ^Applicative<'U>, 'T, 'U

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

x : ^Applicative<'T>
y : ^Applicative<'U>
Returns: ^Applicative<'U>

x <* y

Full Usage: x <* y

Parameters:
    x : ^Applicative<'U>
    y : ^Applicative<'T>

Returns: ^Applicative<'U>
Modifiers: inline
Type parameters: ^Applicative<'U>, ^Applicative<'T->'U>, ^Applicative<'T>, 'U, 'T

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

x : ^Applicative<'U>
y : ^Applicative<'T>
Returns: ^Applicative<'U>

f <*> x

Full Usage: f <*> x

Parameters:
    f : ^Applicative<'T->'U>
    x : ^Applicative<'T>

Returns: ^Applicative<'U>
Modifiers: inline
Type parameters: ^Applicative<'T -> 'U>, ^Applicative<'T>, ^Applicative<'U>

Apply a lifted argument to a lifted function: f <*> arg

f : ^Applicative<'T->'U>
x : ^Applicative<'T>
Returns: ^Applicative<'U>

lift2 f x y

Full Usage: lift2 f x y

Parameters:
    f : 'T -> 'U -> 'V
    x : ^Applicative<'T>
    y : ^Applicative<'U>

Returns: ^Applicative<'V>
Modifiers: inline
Type parameters: 'T, 'U, 'V, ^Applicative<'T>, ^Applicative<'U>, ^Applicative<'V>

Applies 2 lifted arguments to a non-lifted function. Equivalent to map2 in non list-like types.

f : 'T -> 'U -> 'V
x : ^Applicative<'T>
y : ^Applicative<'U>
Returns: ^Applicative<'V>

lift3 f x y z

Full Usage: lift3 f x y z

Parameters:
    f : 'T -> 'U -> 'V -> 'W
    x : ^Applicative<'T>
    y : ^Applicative<'U>
    z : ^Applicative<'V>

Returns: ^Applicative<'W>
Modifiers: inline
Type parameters: 'T, 'U, 'V, 'W, ^Applicative<'T>, ^Applicative<'U>, ^Applicative<'V>, ^Applicative<'W>

Applies 3 lifted arguments to a non-lifted function. Equivalent to map3 in non list-like types.

f : 'T -> 'U -> 'V -> 'W
x : ^Applicative<'T>
y : ^Applicative<'U>
z : ^Applicative<'V>
Returns: ^Applicative<'W>

opt v

Full Usage: opt v

Parameters:
    v : ^Alternative<'T>

Returns: ^Alternative>
Modifiers: inline
Type parameters: ^Alternative<'T>, ^Alternative<option<'T>>, 'T

Transforms an alternative value (which has the notion of success/failure) to an alternative that always succeed, wrapping the original value into an option to signify success/failure of the original alternative.

v : ^Alternative<'T>
Returns: ^Alternative>

result x

Full Usage: result x

Parameters:
    x : 'T

Returns: ^Functor<'T>
Modifiers: inline
Type parameters: 'T, ^Functor<'T>

Lifts a value into a Functor. Same as return in Computation Expressions.

x : 'T
Returns: ^Functor<'T>

Monad

Functions and values

Function or value Description

(<=<) g f x

Full Usage: (<=<) g f x

Parameters:
    g : 'b -> ^Monad<'V>
    f : 'T -> ^Monad<'U>
    x : 'T

Returns: ^Monad<'V>
Modifiers: inline
Type parameters: 'b, ^Monad<'V>, ^Monad<'U>, 'T

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

g : 'b -> ^Monad<'V>
f : 'T -> ^Monad<'U>
x : 'T
Returns: ^Monad<'V>

f =<< x

Full Usage: f =<< x

Parameters:
    f : 'T -> ^Monad<'U>
    x : ^Monad<'T>

Returns: ^Monad<'U>
Modifiers: inline
Type parameters: 'T, ^Monad<'U>, ^Monad<'T>

Takes a function from a plain type to a monadic value and a monadic value, and returns a new monadic value.

f : 'T -> ^Monad<'U>
x : ^Monad<'T>
Returns: ^Monad<'U>

(>=>) f g x

Full Usage: (>=>) f g x

Parameters:
    f : 'T -> ^Monad<'U>
    g : 'U -> ^Monad<'V>
    x : 'T

Returns: ^Monad<'V>
Modifiers: inline
Type parameters: 'T, ^Monad<'U>, ^Monad<'V>, 'U

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

f : 'T -> ^Monad<'U>
g : 'U -> ^Monad<'V>
x : 'T
Returns: ^Monad<'V>

x >>= f

Full Usage: x >>= f

Parameters:
    x : ^Monad<'T>
    f : 'T -> ^Monad<'U>

Returns: ^Monad<'U>
Modifiers: inline
Type parameters: ^Monad<'T>, ^Monad<'U>, 'T

Takes a monadic value and a function from a plain type to a monadic value, and returns a new monadic value.

x : ^Monad<'T>
f : 'T -> ^Monad<'U>
Returns: ^Monad<'U>

bind f x

Full Usage: bind f x

Parameters:
    f : 'T -> ^Monad<'U>
    x : ^Monad<'T>

Returns: ^Monad<'U>
Modifiers: inline
Type parameters: 'T, ^Monad<'U>, ^Monad<'T>

Takes a function from a plain type to a monadic value and a monadic value, and returns a new monadic value.

f : 'T -> ^Monad<'U>
x : ^Monad<'T>
Returns: ^Monad<'U>

join x

Full Usage: join x

Parameters:
    x : ^Monad>

Returns: ^Monad<'T>
Modifiers: inline
Type parameters: ^Monad<Monad<'T>>, ^Monad<'T>

Flattens two layers of monadic information into one.

x : ^Monad>
Returns: ^Monad<'T>

liftM f m1

Full Usage: liftM f m1

Parameters:
    f : 'T -> 'U
    m1 : ^Monad<'T>

Returns: ^Monad<'U>
Modifiers: inline
Type parameters: 'T, 'U, ^Monad<'T>, ^Monad<'U>

Equivalent to map but only for Monads.

f : 'T -> 'U
m1 : ^Monad<'T>
Returns: ^Monad<'U>

Monoid

Functions and values

Function or value Description

x ++ y

Full Usage: x ++ y

Parameters:
    x : ^Monoid
    y : ^Monoid

Returns: ^Monoid
Modifiers: inline
Type parameters: ^Monoid

Combines two monoids in one.

x : ^Monoid
y : ^Monoid
Returns: ^Monoid

getZero ()

Full Usage: getZero ()

Parameters:
    () : unit

Returns: ^Monoid
Modifiers: inline
Type parameters: ^Monoid

Gets a value that represents the 0 element of a Monoid.

() : unit
Returns: ^Monoid

plus x y

Full Usage: plus x y

Parameters:
    x : ^Monoid
    y : ^Monoid

Returns: ^Monoid
Modifiers: inline
Type parameters: ^Monoid

Combines two monoids in one.

x : ^Monoid
y : ^Monoid
Returns: ^Monoid

zero

Full Usage: zero

Returns: ^Monoid
Modifiers: inline
Type parameters: ^Monoid

A value that represents the 0 element of a Monoid.

Returns: ^Monoid

Alternative/Monadplus/Arrowplus

Functions and values

Function or value Description

x <|> y

Full Usage: x <|> y

Parameters:
    x : ^Functor<'T>
    y : ^Functor<'T>

Returns: ^Functor<'T>
Modifiers: inline
Type parameters: ^Functor<'T>

Combines two Alternatives

x : ^Functor<'T>
y : ^Functor<'T>
Returns: ^Functor<'T>

empty

Full Usage: empty

Returns: ^Functor<'T>
Modifiers: inline
Type parameters: ^Functor<'T>

A functor representing the empty value.

Returns: ^Functor<'T>

getEmpty ()

Full Usage: getEmpty ()

Parameters:
    () : unit

Returns: ^Functor<'T>
Modifiers: inline
Type parameters: ^Functor<'T>

Gets a functor representing the empty value.

() : unit
Returns: ^Functor<'T>

guard x

Full Usage: guard x

Parameters:
    x : bool

Returns: ^MonadPlus
Modifiers: inline
Type parameters: ^MonadPlus<unit>

Conditional failure of Alternative computations. If true it lifts the unit value, else it returns empty. Common uses of guard include conditionally signaling an error in an error monad and conditionally rejecting the current choice in an Alternative-based parser.

x : bool
Returns: ^MonadPlus

Contravariant/Bifunctor/Profunctor/Invariant

Functions and values

Function or value Description

bimap f g source

Full Usage: bimap f g source

Parameters:
    f : 'T -> 'U
    g : 'V -> 'W
    source : ^Bifunctor<'T,'V>

Returns: ^Bifunctor<'U,'W>
Modifiers: inline
Type parameters: 'T, 'U, 'V, 'W, ^Bifunctor<'T,'V>, ^Bifunctor<'U,'W>

Maps over both arguments of the Bifunctor at the same time.

f : 'T -> 'U
g : 'V -> 'W
source : ^Bifunctor<'T,'V>
Returns: ^Bifunctor<'U,'W>

contramap f x

Full Usage: contramap f x

Parameters:
    f : 'U -> 'T
    x : ^Contravariant<'T>

Returns: ^Contravariant<'U>
Modifiers: inline
Type parameters: 'U, 'T, ^Contravariant<'T>, ^Contravariant<'U>

Maps over the input.

f : 'U -> 'T
x : ^Contravariant<'T>
Returns: ^Contravariant<'U>

dimap f g source

Full Usage: dimap f g source

Parameters:
    f : 'A -> 'B
    g : 'C -> 'D
    source : ^Profunctor<'B,'C>

Returns: ^Profunctor<'A,'D>
Modifiers: inline
Type parameters: 'A, 'B, 'C, 'D, ^Profunctor<'B,'C>, ^Profunctor<'A,'D>

Maps over both arguments at the same time of a Profunctor.

f : 'A -> 'B
g : 'C -> 'D
source : ^Profunctor<'B,'C>
Returns: ^Profunctor<'A,'D>

first f source

Full Usage: first f source

Parameters:
    f : 'T -> 'V
    source : ^Bifunctor<'T,'V>

Returns: ^Bifunctor<'U,'V>
Modifiers: inline
Type parameters: 'T, 'V, ^Bifunctor<'T,'V>, ^Bifunctor<'U,'V>

Maps covariantly over the first argument of the Bifunctor.

f : 'T -> 'V
source : ^Bifunctor<'T,'V>
Returns: ^Bifunctor<'U,'V>

invmap f g source

Full Usage: invmap f g source

Parameters:
    f : 'T -> 'U
    g : 'U -> 'T
    source : ^InvariantFunctor<'T>

Returns: 'InvariantFunctor<'U>
Modifiers: inline
Type parameters: 'T, 'U, ^InvariantFunctor<'T>, 'InvariantFunctor<'U>

Maps a pair of functions over an Invariant Functor

f : 'T -> 'U
g : 'U -> 'T
source : ^InvariantFunctor<'T>
Returns: 'InvariantFunctor<'U>

lmap f source

Full Usage: lmap f source

Parameters:
    f : 'A -> 'B
    source : ^Profunctor<'B,'C>

Returns: ^Profunctor<'A,'C>
Modifiers: inline
Type parameters: 'A, 'B, ^Profunctor<'B,'C>, ^Profunctor<'A,'C>

Maps over the left part of a Profunctor.

f : 'A -> 'B
source : ^Profunctor<'B,'C>
Returns: ^Profunctor<'A,'C>

rmap f source

Full Usage: rmap f source

Parameters:
    f : 'C -> 'D
    source : ^Profunctor<'B,'C>

Returns: ^Profunctor<'B,'D>
Modifiers: inline
Type parameters: 'C, 'D, ^Profunctor<'B,'C>, ^Profunctor<'B,'D>

Maps over the right part of a Profunctor.

f : 'C -> 'D
source : ^Profunctor<'B,'C>
Returns: ^Profunctor<'B,'D>

second f source

Full Usage: second f source

Parameters:
    f : 'V -> 'W
    source : ^Bifunctor<'T,'V>

Returns: ^Bifunctor<'T,'W>
Modifiers: inline
Type parameters: 'V, 'W, ^Bifunctor<'T,'V>, ^Bifunctor<'T,'W>

Maps covariantly over the second argument of the Bifunctor.

f : 'V -> 'W
source : ^Bifunctor<'T,'V>
Returns: ^Bifunctor<'T,'W>

Category

Functions and values

Function or value Description

catComp f g

Full Usage: catComp f g

Parameters:
    f : ^Category<'U,'V>
    g : 'Category<'T,'U>

Returns: 'Category<'T,'V>
Modifiers: inline
Type parameters: ^Category<'U,'V>, 'Category<'T,'U>, 'Category<'T,'V>

Right-to-left morphism composition.

f : ^Category<'U,'V>
g : 'Category<'T,'U>
Returns: 'Category<'T,'V>

catId

Full Usage: catId

Returns: ^Category<'T,'T>
Modifiers: inline
Type parameters: ^Category<'T,'T>

The identity morphism.

Returns: ^Category<'T,'T>

getCatId ()

Full Usage: getCatId ()

Parameters:
    () : unit

Returns: ^Category<'T,'T>
Modifiers: inline
Type parameters: ^Category<'T,'T>

Gets the identity morphism.

() : unit
Returns: ^Category<'T,'T>

Arrow

Functions and values

Function or value Description

f *** g

Full Usage: f *** g

Parameters:
    f : 'Arrow<'T1,'U1>
    g : 'Arrow<'T2,'U2>

Returns: ^Arrow<('T1*'T2),('U1*'U2)>
Modifiers: inline
Type parameters: 'Arrow<'T1,'U1>, 'Arrow<'T2,'U2>, ^Arrow<('T1 * 'T2),('U1 * 'U2)>

Splits the input between the two argument arrows and combine their output. Note that this is in general not a functor.

f : 'Arrow<'T1,'U1>
g : 'Arrow<'T2,'U2>
Returns: ^Arrow<('T1*'T2),('U1*'U2)>

arr f

Full Usage: arr f

Parameters:
    f : 'T -> 'U

Returns: ^Arrow<'T,'U>
Modifiers: inline
Type parameters: 'T, 'U, ^Arrow<'T,'U>

Lifts a function to an arrow.

f : 'T -> 'U
Returns: ^Arrow<'T,'U>

arrFirst f

Full Usage: arrFirst f

Parameters:
    f : ^Arrow<'T,'U>

Returns: ^Arrow<('T*'V),('U*'V)>
Modifiers: inline
Type parameters: ^Arrow<'T,'U>, ^Arrow<('T * 'V),('U * 'V)>

Sends the first component of the input through the argument arrow, and copy the rest unchanged to the output.

f : ^Arrow<'T,'U>
Returns: ^Arrow<('T*'V),('U*'V)>

arrSecond f

Full Usage: arrSecond f

Parameters:
    f : ^Arrow<'T,'U>

Returns: ^Arrow<('V*'T),('V*'U)>
Modifiers: inline
Type parameters: ^Arrow<'T,'U>, ^Arrow<('V * 'T),('V * 'U)>

Sends the second component of the input through the argument arrow, and copy the rest unchanged to the output.

f : ^Arrow<'T,'U>
Returns: ^Arrow<('V*'T),('V*'U)>

fanout f g

Full Usage: fanout f g

Parameters:
    f : 'Arrow<'T,'U1>
    g : 'Arrow<'T,'U2>

Returns: ^Arrow<'T,('U1*'U2)>
Modifiers: inline
Type parameters: 'Arrow<'T,'U1>, 'Arrow<'T,'U2>, ^Arrow<'T,('U1 * 'U2)>

Sends the input to both argument arrows and combine their output. Also known as the (&&&) operator.

f : 'Arrow<'T,'U1>
g : 'Arrow<'T,'U2>
Returns: ^Arrow<'T,('U1*'U2)>

Arrow Choice

Functions and values

Function or value Description

f +++ g

Full Usage: f +++ g

Parameters:
    f : 'ArrowChoice<'T1,'U1>
    g : 'ArrowChoice<'T2,'U2>

Returns: ^ArrowChoice,Choice<'U2,'U1>>
Modifiers: inline
Type parameters: 'ArrowChoice<'T1,'U1>, 'ArrowChoice<'T2,'U2>, ^ArrowChoice<Choice<'T2,'T1>,Choice<'U2,'U1>>

Splits the input between both argument arrows, retagging and merging their outputs. Note that this is in general not a functor.

f : 'ArrowChoice<'T1,'U1>
g : 'ArrowChoice<'T2,'U2>
Returns: ^ArrowChoice,Choice<'U2,'U1>>

fanin f g

Full Usage: fanin f g

Parameters:
    f : 'ArrowChoice<'T,'V>
    g : 'ArrowChoice<'U,'V>

Returns: ^ArrowChoice,'V>
Modifiers: inline
Type parameters: 'ArrowChoice<'T,'V>, 'ArrowChoice<'U,'V>, ^ArrowChoice<Choice<'U,'T>,'V>

Splits the input between the two argument arrows and merge their outputs. Also known as the (|||) operator.

f : 'ArrowChoice<'T,'V>
g : 'ArrowChoice<'U,'V>
Returns: ^ArrowChoice,'V>

left f

Full Usage: left f

Parameters:
    f : ^ArrowChoice<'T,'U>

Returns: ^ArrowChoice,Choice<'V,'U>>
Modifiers: inline
Type parameters: ^ArrowChoice<'T,'U>, ^ArrowChoice<Choice<'V,'T>,Choice<'V,'U>>

Feeds marked inputs through the left argument arrow, passing the rest through unchanged to the output.

f : ^ArrowChoice<'T,'U>
Returns: ^ArrowChoice,Choice<'V,'U>>

right f

Full Usage: right f

Parameters:
    f : ^ArrowChoice<'T,'U>

Returns: ^ArrowChoice,Choice<'U,'V>>
Modifiers: inline
Type parameters: ^ArrowChoice<'T,'U>, ^ArrowChoice<Choice<'T,'V>,Choice<'U,'V>>

Feeds marked inputs through the right argument arrow, passing the rest through unchanged to the output.

f : ^ArrowChoice<'T,'U>
Returns: ^ArrowChoice,Choice<'U,'V>>

Arrow Apply

Functions and values

Function or value Description

app

Full Usage: app

Returns: ^ArrowApply<('ArrowApply<'T,'U>*'T)>,'U)>
Modifiers: inline
Type parameters: ^ArrowApply<('ArrowApply<'T,'U> * 'T)>,'U)>

Applies an arrow produced as the output of some previous computation to an input, producing its output as the output of app.

Returns: ^ArrowApply<('ArrowApply<'T,'U>*'T)>,'U)>

getApp ()

Full Usage: getApp ()

Parameters:
    () : unit

Returns: ^ArrowApply<('ArrowApply<'T,'U>*'T)>,'U)>
Modifiers: inline
Type parameters: ^ArrowApply<('ArrowApply<'T,'U> * 'T)>,'U)>

Applies an arrow produced as the output of some previous computation to an input, producing its output as the output of app.

() : unit
Returns: ^ArrowApply<('ArrowApply<'T,'U>*'T)>,'U)>

Foldable

Functions and values

Function or value Description

exists predicate source

Full Usage: exists predicate source

Parameters:
    predicate : 'T -> bool - The function to test the input elements.
    source : ^Foldable<'T> - The input foldable.

Returns: bool True if any element satisfies the predicate.
Modifiers: inline
Type parameters: 'T, ^Foldable<'T>

Tests if any element of the list satisfies the given predicate.

The predicate is applied to the elements of the input foldable. If any application returns true then the overall result is true and no further elements are tested. Otherwise, false is returned.

predicate : 'T -> bool

The function to test the input elements.

source : ^Foldable<'T>

The input foldable.

Returns: bool

True if any element satisfies the predicate.

find predicate source

Full Usage: find predicate source

Parameters:
    predicate : 'T -> bool - The function to test the input elements.
    source : ^Foldable<'T> - The input foldable.

Returns: 'T The first element that satisfies the predicate.
Modifiers: inline
Type parameters: 'T, ^Foldable<'T>

Gets the first element for which the given function returns true. Raises KeyNotFoundException if no such element exists.

predicate : 'T -> bool

The function to test the input elements.

source : ^Foldable<'T>

The input foldable.

Returns: 'T

The first element that satisfies the predicate.

KeyNotFoundException Thrown if the predicate evaluates to false for all the elements of the foldable.

fold folder state foldable

Full Usage: fold folder state foldable

Parameters:
    folder : 'State -> 'T -> 'State - The function to update the state given the input elements.
    state : 'State - The initial state.
    foldable : ^Foldable<'T> - The input foldable.

Returns: 'State The final state value.
Modifiers: inline
Type parameters: 'State, 'T, ^Foldable<'T>

Applies a function to each element of the foldable, threading an accumulator argument through the computation. Take the second argument, and apply the function to it and the first element of the foldable. Then feed this result into the function along with the second element and so on. Return the final result. If the input function is f and the elements are i0...iN then computes f (... (f s i0) i1 ...) iN.

folder : 'State -> 'T -> 'State

The function to update the state given the input elements.

state : 'State

The initial state.

foldable : ^Foldable<'T>

The input foldable.

Returns: 'State

The final state value.

foldMap f x

Full Usage: foldMap f x

Parameters:
    f : 'T -> 'Monoid
    x : ^Foldable<'T>

Returns: 'Monoid
Modifiers: inline
Type parameters: 'T, 'Monoid, ^Foldable<'T>

Folds by mapping all values to a Monoid

f : 'T -> 'Monoid
x : ^Foldable<'T>
Returns: 'Monoid

forall predicate source

Full Usage: forall predicate source

Parameters:
    predicate : 'T -> bool - The function to test the input elements.
    source : ^Foldable<'T> - The input foldable.

Returns: bool True if all of the elements satisfy the predicate.
Modifiers: inline
Type parameters: 'T, ^Foldable<'T>

Tests if all elements of the collection satisfy the given predicate.

The predicate is applied to the elements of the input foldable. If any application returns false then the overall result is false and no further elements are tested. Otherwise, true is returned.

predicate : 'T -> bool

The function to test the input elements.

source : ^Foldable<'T>

The input foldable.

Returns: bool

True if all of the elements satisfy the predicate.

head source

Full Usage: head source

Parameters:
    source : ^Foldable<'T> - The input flodable.

Returns: 'T The first element of the foldable.
Modifiers: inline
Type parameters: ^Foldable<'T>, 'T

Gets the first element of the foldable.

source : ^Foldable<'T>

The input flodable.

Returns: 'T

The first element of the foldable.

ArgumentException Thrown when the foldable is empty.

intercalate sep source

Full Usage: intercalate sep source

Parameters:
    sep : ^Monoid
    source : ^Foldable<'Monoid>

Returns: ^Monoid
Modifiers: inline
Type parameters: ^Monoid, ^Foldable<'Monoid>

Folds the source, inserting a separator between each element.

sep : ^Monoid
source : ^Foldable<'Monoid>
Returns: ^Monoid

length source

Full Usage: length source

Parameters:
    source : ^Foldable<'T> - The input foldable.

Returns: int The length of the foldable.
Modifiers: inline
Type parameters: ^Foldable<'T>

Gets the number of elements in the foldable.

source : ^Foldable<'T>

The input foldable.

Returns: int

The length of the foldable.

maxBy projection source

Full Usage: maxBy projection source

Parameters:
    projection : 'T -> 'U
    source : ^Foldable<'T>

Returns: 'T
Modifiers: inline
Type parameters: 'T, 'U, ^Foldable<'T>

Gets the maximum value after projecting in the foldable

projection : 'T -> 'U
source : ^Foldable<'T>
Returns: 'T

maximum source

Full Usage: maximum source

Parameters:
    source : ^Foldable<'T>

Returns: 'T
Modifiers: inline
Type parameters: ^Foldable<'T>, 'T

Gets the maximum value in the foldable

source : ^Foldable<'T>
Returns: 'T

minBy projection source

Full Usage: minBy projection source

Parameters:
    projection : 'T -> 'U
    source : ^Foldable<'T>

Returns: 'T
Modifiers: inline
Type parameters: 'T, 'U, ^Foldable<'T>

Gets the minimum value after projecting in the foldable

projection : 'T -> 'U
source : ^Foldable<'T>
Returns: 'T

minimum source

Full Usage: minimum source

Parameters:
    source : ^Foldable<'T>

Returns: 'T
Modifiers: inline
Type parameters: ^Foldable<'T>, 'T

Gets the minimum value in the foldable

source : ^Foldable<'T>
Returns: 'T

nth n source

Full Usage: nth n source

Parameters:
    n : int
    source : ^Foldable<'T>

Returns: 'T
Modifiers: inline
Type parameters: ^Foldable<'T>, 'T

Gets the nth value in the foldable - i.e. at position 'n'

n : int
source : ^Foldable<'T>
Returns: 'T

pick chooser source

Full Usage: pick chooser source

Parameters:
    chooser : 'T -> 'U option - The function to generate options from the elements.
    source : ^Foldable<'T> - The input foldable.

Returns: 'U The first resulting value.
Modifiers: inline
Type parameters: 'T, 'U, ^Foldable<'T>

Applies the given function to successive elements, returning the first result where function returns Some(x) for some x. If no such element exists then raise System.Collections.Generic.KeyNotFoundException

chooser : 'T -> 'U option

The function to generate options from the elements.

source : ^Foldable<'T>

The input foldable.

Returns: 'U

The first resulting value.

KeyNotFoundException Thrown when the foldable is empty.

toArray source

Full Usage: toArray source

Parameters:
    source : ^a - The input foldable.

Returns: 'T[] The array of foldable elements.
Modifiers: inline

Builds an array from the given foldable.

source : ^a

The input foldable.

Returns: 'T[]

The array of foldable elements.

toList source

Full Usage: toList source

Parameters:
    source : ^a - The input foldable.

Returns: 'T list The list of foldable elements.
Modifiers: inline

Builds a list from the given foldable.

source : ^a

The input foldable.

Returns: 'T list

The list of foldable elements.

toSeq source

Full Usage: toSeq source

Parameters:
    source : ^Foldable<'T> - The input foldable.

Returns: seq<'T> The sequence of elements in the foldable.
Modifiers: inline
Type parameters: ^Foldable<'T>, 'T

Views the given foldable as a sequence.

source : ^Foldable<'T>

The input foldable.

Returns: seq<'T>

The sequence of elements in the foldable.

tryFind predicate source

Full Usage: tryFind predicate source

Parameters:
    predicate : 'T -> bool - The function to test the input elements.
    source : ^Foldable<'T> - The input foldable.

Returns: 'T option The first element for which the predicate returns true, or None if every element evaluates to false.
Modifiers: inline
Type parameters: 'T, ^Foldable<'T>

Gets the first element for which the given function returns true. Returns None if no such element exists.

predicate : 'T -> bool

The function to test the input elements.

source : ^Foldable<'T>

The input foldable.

Returns: 'T option

The first element for which the predicate returns true, or None if every element evaluates to false.

tryHead source

Full Usage: tryHead source

Parameters:
    source : ^Foldable<'T> - The input foldable.

Returns: 'T option The first element of the foldable or None.
Modifiers: inline
Type parameters: ^Foldable<'T>, 'T

Gets the first element of the foldable, or None if the foldable is empty.

source : ^Foldable<'T>

The input foldable.

Returns: 'T option

The first element of the foldable or None.

tryLast source

Full Usage: tryLast source

Parameters:
    source : ^Foldable<'T> - The input foldable.

Returns: 'T option The last element of the foldable or None.
Modifiers: inline
Type parameters: ^Foldable<'T>, 'T

Gets the last element of the foldable, or None if the foldable is empty.

Unsafe for infinite sequence input.

source : ^Foldable<'T>

The input foldable.

Returns: 'T option

The last element of the foldable or None.

tryPick chooser source

Full Usage: tryPick chooser source

Parameters:
    chooser : 'T -> 'U option - The function to generate options from the elements.
    source : ^Foldable<'T> - The input foldable.

Returns: 'U option The first resulting value or None.
Modifiers: inline
Type parameters: 'T, 'U, ^Foldable<'T>

Applies the given function to successive elements, returning Some(x) the first result where function returns Some(x) for some x. If no such element exists then return None.

chooser : 'T -> 'U option

The function to generate options from the elements.

source : ^Foldable<'T>

The input foldable.

Returns: 'U option

The first resulting value or None.

Reducible

Functions and values

Function or value Description

reduce reduction source

Full Usage: reduce reduction source

Parameters:
    reduction : 'T -> 'T -> 'T - The function to reduce two reducible elements to a single element.
    source : ^Reducible<'T> - The input reducible.

Returns: 'T The final reduced value.
Modifiers: inline
Type parameters: 'T, ^Reducible<'T>

Applies a function to each element of the reducible, threading an accumulator argument through the computation. Apply the function to the first two elements of the reducible. Then feed this result into the function along with the third element and so on. Return the final result. If the input function is f and the elements are i0...iN then computes f (... (f i0 i1) i2 ...) iN.

reduction : 'T -> 'T -> 'T

The function to reduce two reducible elements to a single element.

source : ^Reducible<'T>

The input reducible.

Returns: 'T

The final reduced value.

Traversable

Functions and values

Function or value Description

sequence t

Full Usage: sequence t

Parameters:
    t : ^Traversable<'Functor<'T>>

Returns: ^Functor<'Traversable<'T>>
Modifiers: inline
Type parameters: ^Traversable<'Functor<'T>>, ^Functor<'Traversable<'T>>

Evaluate each action in the structure from left to right, and collect the results.

t : ^Traversable<'Functor<'T>>
Returns: ^Functor<'Traversable<'T>>

traverse f t

Full Usage: traverse f t

Parameters:
    f : 'T -> 'Functor<'U>
    t : ^Traversable<'T>

Returns: ^Functor<'Traversable<'U>>
Modifiers: inline
Type parameters: 'T, 'Functor<'U>, ^Traversable<'T>, ^Functor<'Traversable<'U>>

Map each element of a structure to an action, evaluate these actions from left to right, and collect the results.

f : 'T -> 'Functor<'U>
t : ^Traversable<'T>
Returns: ^Functor<'Traversable<'U>>

Bifoldable

Functions and values

Function or value Description

bifold leftFolder rightFolder state source

Full Usage: bifold leftFolder rightFolder state source

Parameters:
    leftFolder : 'State -> 'T1 -> 'State
    rightFolder : 'State -> 'T2 -> 'State
    state : 'State
    source : ^Bifoldable<'T1,'T2>

Returns: 'State
Modifiers: inline
Type parameters: 'State, 'T1, 'T2, ^Bifoldable<'T1,'T2>

Combines the elements of a structure in a right associative manner.

leftFolder : 'State -> 'T1 -> 'State
rightFolder : 'State -> 'T2 -> 'State
state : 'State
source : ^Bifoldable<'T1,'T2>
Returns: 'State

bifoldBack leftFolder rightFolder source state

Full Usage: bifoldBack leftFolder rightFolder source state

Parameters:
    leftFolder : 'T1 -> 'State -> 'State
    rightFolder : 'T2 -> 'State -> 'State
    source : ^Bifoldable<'T1,'T2>
    state : 'State

Returns: 'State
Modifiers: inline
Type parameters: 'T1, 'State, 'T2, ^Bifoldable<'T1,'T2>

Combines the elements of a structure in a left associative manner.

leftFolder : 'T1 -> 'State -> 'State
rightFolder : 'T2 -> 'State -> 'State
source : ^Bifoldable<'T1,'T2>
state : 'State
Returns: 'State

bifoldMap f g source

Full Usage: bifoldMap f g source

Parameters:
    f : 'T1 -> 'Monoid
    g : 'T2 -> 'Monoid
    source : ^Bifoldable<'T1,'T2>

Returns: 'Monoid
Modifiers: inline
Type parameters: 'T1, 'Monoid, 'T2, ^Bifoldable<'T1,'T2>

Combines the elements of a structure, given ways of mapping them to a Common Combinators monoid.

f : 'T1 -> 'Monoid
g : 'T2 -> 'Monoid
source : ^Bifoldable<'T1,'T2>
Returns: 'Monoid

bisum source

Full Usage: bisum source

Parameters:
    source : ^Bifoldable<'Monoid,'Monoid>

Returns: 'Monoid
Modifiers: inline
Type parameters: ^Bifoldable<'Monoid,'Monoid>, 'Monoid

Combines the elements of a structure using a monoid.

source : ^Bifoldable<'Monoid,'Monoid>
Returns: 'Monoid

Bitraversable

Functions and values

Function or value Description

bisequence source

Full Usage: bisequence source

Parameters:
    source : ^Bitraversable<'Functor<'T>,'Functor<'U>>

Returns: ^Functor<'Bitraversable<'T,'U>>
Modifiers: inline
Type parameters: ^Bitraversable<'Functor<'T>,'Functor<'U>>, ^Functor<'Bitraversable<'T,'U>>

Sequences all the actions in a structure, building a new structure with the same shape using the results of the actions.

source : ^Bitraversable<'Functor<'T>,'Functor<'U>>
Returns: ^Functor<'Bitraversable<'T,'U>>

bitraverse f g source

Full Usage: bitraverse f g source

Parameters:
    f : 'T1 -> 'Functor<'T2>
    g : 'U1 -> 'Functor<'U2>
    source : ^Bitraversable<'T1,'U1>

Returns: ^Functor<'Bitraversable<'T2,'U2>>
Modifiers: inline
Type parameters: 'T1, 'Functor<'T2>, 'U1, 'Functor<'U2>, ^Bitraversable<'T1,'U1>, ^Functor<'Bitraversable<'T2,'U2>>

Evaluates the relevant functions at each element in the structure, running the action, and builds a new structure with the same shape, using the results produced from sequencing the actions.

f : 'T1 -> 'Functor<'T2>
g : 'U1 -> 'Functor<'U2>
source : ^Bitraversable<'T1,'U1>
Returns: ^Functor<'Bitraversable<'T2,'U2>>

Indexable

Functions and values

Function or value Description

choosei mapping source

Full Usage: choosei mapping source

Parameters:
    mapping : 'K -> 'T -> 'U option - The mapping function, taking index and element as parameters.
    source : ^FunctorWithIndex<'T> - The input collection.

Returns: 'FunctorWithIndex<'U>
Modifiers: inline
Type parameters: 'K, 'T, 'U, ^FunctorWithIndex<'T>, 'FunctorWithIndex<'U>

Choose with access to the index.

mapping : 'K -> 'T -> 'U option

The mapping function, taking index and element as parameters.

source : ^FunctorWithIndex<'T>

The input collection.

Returns: 'FunctorWithIndex<'U>

findIndex predicate source

Full Usage: findIndex predicate source

Parameters:
    predicate : 'T -> bool - The function to test the input elements.
    source : ^Indexable<'T> - The input collection.

Returns: 'Index The index of the first element that satisfies the predicate.
Modifiers: inline
Type parameters: 'T, ^Indexable<'T>, 'Index

Gets the index of the first element in the source that satisfies the given predicate.

predicate : 'T -> bool

The function to test the input elements.

source : ^Indexable<'T>

The input collection.

Returns: 'Index

The index of the first element that satisfies the predicate.

ArgumentException Thrown if the predicate evaluates to false for all the elements of the source.

findSliceIndex slice source

Full Usage: findSliceIndex slice source

Parameters:
    slice : ^Indexable<'T> - The slice to be searched.
    source : ^Indexable<'T> - The input collection.

Returns: 'Index The index of the slice.
Modifiers: inline
Type parameters: ^Indexable<'T>, 'Index

Gets the index of the first occurrence of the specified slice in the source.

slice : ^Indexable<'T>

The slice to be searched.

source : ^Indexable<'T>

The input collection.

Returns: 'Index

The index of the slice.

ArgumentException Thrown when the slice was not found in the source.

foldi folder state source

Full Usage: foldi folder state source

Parameters:
    folder : 'State -> 'K -> 'T -> 'State
    state : 'State
    source : ^FoldableWithIndex<'T>

Returns: 'State
Modifiers: inline
Type parameters: 'State, 'K, 'T, ^FoldableWithIndex<'T>

Left-associative fold of an indexed container with access to the index i.

folder : 'State -> 'K -> 'T -> 'State
state : 'State
source : ^FoldableWithIndex<'T>
Returns: 'State

item n source

Full Usage: item n source

Parameters:
    n : 'K
    source : ^Indexed<'T>

Returns: 'T
Modifiers: inline
Type parameters: 'K, ^Indexed<'T>, 'T

Gets an item from the given index.

n : 'K
source : ^Indexed<'T>
Returns: 'T

iteri action source

Full Usage: iteri action source

Parameters:
    action : 'K -> 'T -> unit
    source : ^FunctorWithIndex<'T>

Modifiers: inline
Type parameters: 'K, 'T, ^FunctorWithIndex<'T>

Maps an action with access to an index.

action : 'K -> 'T -> unit
source : ^FunctorWithIndex<'T>

mapi mapping source

Full Usage: mapi mapping source

Parameters:
    mapping : 'K -> 'T -> 'U
    source : ^FunctorWithIndex<'T>

Returns: 'FunctorWithIndex<'U>
Modifiers: inline
Type parameters: 'K, 'T, 'U, ^FunctorWithIndex<'T>, 'FunctorWithIndex<'U>

Maps with access to the index.

mapping : 'K -> 'T -> 'U
source : ^FunctorWithIndex<'T>
Returns: 'FunctorWithIndex<'U>

traversei f t

Full Usage: traversei f t

Parameters:
    f : 'K -> 'T -> 'Applicative<'U>
    t : ^Traversable<'T>>

Returns: ^Applicative<'Traversable<'U>>
Modifiers: inline
Type parameters: 'K, 'T, 'Applicative<'U>, ^Traversable<'T>>, ^Applicative<'Traversable<'U>>

Traverses an indexed container. Behaves exactly like a regular traverse except that the traversing function also has access to the key associated with a value.

f : 'K -> 'T -> 'Applicative<'U>
t : ^Traversable<'T>>
Returns: ^Applicative<'Traversable<'U>>

tryFindIndex predicate source

Full Usage: tryFindIndex predicate source

Parameters:
    predicate : 'T -> bool - The function to test the input elements.
    source : ^Indexable<'T> - The input collection.

Returns: 'Index option The index of the first element that satisfies the predicate, or None.
Modifiers: inline
Type parameters: 'T, ^Indexable<'T>, 'Index

Gets the index of the first element in the source that satisfies the given predicate. Returns None if not found.

predicate : 'T -> bool

The function to test the input elements.

source : ^Indexable<'T>

The input collection.

Returns: 'Index option

The index of the first element that satisfies the predicate, or None.

tryFindSliceIndex slice source

Full Usage: tryFindSliceIndex slice source

Parameters:
    slice : ^Indexable<'T> - The slice to be searched.
    source : ^Indexable<'T> - The input collection.

Returns: 'Index option The index of the slice or None.
Modifiers: inline
Type parameters: ^Indexable<'T>, 'Index

Gets the index of the first occurrence of the specified slice in the source. Returns None if not found.

slice : ^Indexable<'T>

The slice to be searched.

source : ^Indexable<'T>

The input collection.

Returns: 'Index option

The index of the slice or None.

tryItem n source

Full Usage: tryItem n source

Parameters:
    n : 'K
    source : ^Indexed<'T>

Returns: 'T option
Modifiers: inline
Type parameters: 'K, ^Indexed<'T>, 'T

Tries to get an item from the given index.

n : 'K
source : ^Indexed<'T>
Returns: 'T option

Comonads

Functions and values

Function or value Description

s =>> g

Full Usage: s =>> g

Parameters:
    s : ^Comonad<'T>
    g : ^Comonad<'T> -> 'U

Returns: ^Comonad<'U>
Modifiers: inline
Type parameters: ^Comonad<'T>, ^Comonad<'U>, 'U

Extends a local context-dependent computation to a global computation. Same as extend but with flipped arguments.

s : ^Comonad<'T>
g : ^Comonad<'T> -> 'U
Returns: ^Comonad<'U>

duplicate x

Full Usage: duplicate x

Parameters:
    x : ^Comonad<'T>

Returns: ^Comonad<'Comonad<'T>>
Modifiers: inline
Type parameters: ^Comonad<'T>, ^Comonad<'Comonad<'T>>

Duplicates a comonadic context.

x : ^Comonad<'T>
Returns: ^Comonad<'Comonad<'T>>

extend g s

Full Usage: extend g s

Parameters:
    g : ^Comonad<'T> -> 'U
    s : ^Comonad<'T>

Returns: ^Comonad<'U>
Modifiers: inline
Type parameters: ^Comonad<'T>, ^Comonad<'U>, 'U

Extends a local context-dependent computation to a global computation.

g : ^Comonad<'T> -> 'U
s : ^Comonad<'T>
Returns: ^Comonad<'U>

extract x

Full Usage: extract x

Parameters:
    x : ^Comonad<'T>

Returns: 'T
Modifiers: inline
Type parameters: ^Comonad<'T>, 'T

Extracts a value from a comonadic context.

x : ^Comonad<'T>
Returns: 'T

Monad Transformers

Functions and values

Function or value Description

ask

Full Usage: ask

Returns: ^MonadReader<'R,'T>
Modifiers: inline
Type parameters: ^MonadReader<'R,'T>

The environment from the monad.

Returns: ^MonadReader<'R,'T>

bindError handler value

Full Usage: bindError handler value

Parameters:
    handler : 'E1 -> ^'MonadError<'E2,'T>
    value : ^'MonadError<'E1,'T>

Returns: ^'MonadError<'E2,'T>
Modifiers: inline
Type parameters: 'E1, ^'MonadError<'E2,'T>, ^'MonadError<'E1,'T>

Executes a handler when the value contained in the Error monad represents an error.

handler : 'E1 -> ^'MonadError<'E2,'T>
value : ^'MonadError<'E1,'T>
Returns: ^'MonadError<'E2,'T>

callCC f

Full Usage: callCC f

Parameters:
    f : ('T -> 'MonadCont<'R,'U>) -> ^MonadCont<'R,'T>

Returns: ^MonadCont<'R,'T>
Modifiers: inline
Type parameters: 'T, 'MonadCont<'R,'U>, ^MonadCont<'R,'T>

Calls a function with the current continuation as its argument (call-with-current-continuation).

f : ('T -> 'MonadCont<'R,'U>) -> ^MonadCont<'R,'T>
Returns: ^MonadCont<'R,'T>

catch value handler

Full Usage: catch value handler

Parameters:
    value : ^'MonadError<'E1,'T>
    handler : 'E1 -> ^'MonadError<'E2,'T>

Returns: ^'MonadError<'E2,'T>
Modifiers: inline
Type parameters: ^'MonadError<'E1,'T>, ^'MonadError<'E2,'T>, 'E1

Executes a handler when the value contained in the Error monad represents an error. This is bindError flipped, which makes it useful when used as an operator.

value : ^'MonadError<'E1,'T>
handler : 'E1 -> ^'MonadError<'E2,'T>
Returns: ^'MonadError<'E2,'T>
Example

    let doSomeOperation x = ResultT <| async {
        if x < 10 then return Ok 10
        else return Error "failure" }

    doSomeOperation </catch/> (fun s -> throw ("The error was: " + s))
val doSomeOperation: x: int -> 'a
val x: int
val async: AsyncBuilder
union case Result.Ok: ResultValue: 'T -> Result<'T,'TError>
union case Result.Error: ErrorValue: 'TError -> Result<'T,'TError>
val s: 'a

get

Full Usage: get

Returns: ^MonadState<'S,'S>
Modifiers: inline
Type parameters: ^MonadState<'S, 'S>

The state from the internals of the monad.

Returns: ^MonadState<'S,'S>

gets f

Full Usage: gets f

Parameters:
    f : 'S -> 'T

Returns: ^MonadState<'S,'T>
Modifiers: inline

Gets a value which depends on the current state.

f : 'S -> 'T
Returns: ^MonadState<'S,'T>

lift x

Full Usage: lift x

Parameters:
    x : 'Monad<'T>

Returns: ^MonadTrans<'Monad<'T>>
Modifiers: inline
Type parameters: 'Monad<'T>, ^MonadTrans<'Monad<'T>>

Lifts a computation from the inner monad to the constructed monad.

x : 'Monad<'T>
Returns: ^MonadTrans<'Monad<'T>>

liftAsync x

Full Usage: liftAsync x

Parameters:
Returns: ^MonadAsync<'T>
Modifiers: inline
Type parameters: 'T, ^MonadAsync<'T>

A specialized lift for Async<'T> which is able to bring an Async value from any depth of monad-layers.

x : Async<'T>
Returns: ^MonadAsync<'T>

listen m

Full Usage: listen m

Parameters:
    m : 'MonadWriter<'Monoid,'T> - The action to be executed.

Returns: ^MonadWriter<'Monoid,('T*'Monoid)>
Modifiers: inline
Type parameters: 'MonadWriter<'Monoid,'T>, ^MonadWriter<'Monoid,('T * 'Monoid)>

Executes the action m and adds its output to the value of the computation.

m : 'MonadWriter<'Monoid,'T>

The action to be executed.

Returns: ^MonadWriter<'Monoid,('T*'Monoid)>

local f m

Full Usage: local f m

Parameters:
    f : 'R1 -> 'R2 - The function to modify the environment.
    m : ^MonadReader<'R2,'T> - Reader to run in the modified environment.

Returns: ^MonadReader<'R1,'T>
Modifiers: inline
Type parameters: 'R1, 'R2, ^MonadReader<'R2,'T>, ^MonadReader<'R1,'T>

Executes a computation in a modified environment.

f : 'R1 -> 'R2

The function to modify the environment.

m : ^MonadReader<'R2,'T>

Reader to run in the modified environment.

Returns: ^MonadReader<'R1,'T>

modify f

Full Usage: modify f

Parameters:
    f : 'S -> 'S

Returns: ^MonadState<'S,unit>
Modifiers: inline

Modifies the state inside the monad by applying a function.

f : 'S -> 'S
Returns: ^MonadState<'S,unit>

pass m

Full Usage: pass m

Parameters:
    m : 'MonadWriter<'Monoid,('T*('Monoid->'Monoid))>

Returns: ^MonadWriter<'Monoid,'T>
Modifiers: inline
Type parameters: 'MonadWriter<'Monoid,('T * ('Monoid -> 'Monoid))>, ^MonadWriter<'Monoid,'T>

Executes the action m, which returns a value and a function, and returns the value, applying the function to the output.

m : 'MonadWriter<'Monoid,('T*('Monoid->'Monoid))>
Returns: ^MonadWriter<'Monoid,'T>

put x

Full Usage: put x

Parameters:
    x : 'S

Returns: ^MonadState<'S,unit>
Modifiers: inline
Type parameters: 'S, ^MonadState<'S, unit>

Replaces the state inside the monad.

x : 'S
Returns: ^MonadState<'S,unit>

tell w

Full Usage: tell w

Parameters:
    w : 'Monoid

Returns: ^MonadWriter<'Monoid,unit>
Modifiers: inline
Type parameters: 'Monoid, ^MonadWriter<'Monoid,unit>

Embeds a simple writer action.

w : 'Monoid
Returns: ^MonadWriter<'Monoid,unit>

throw error

Full Usage: throw error

Parameters:
    error : 'E

Returns: ^'MonadError<'E,'T>
Modifiers: inline
Type parameters: 'E, ^'MonadError<'E,'T>

Throws an error value inside the Error monad.

error : 'E
Returns: ^'MonadError<'E,'T>

Collection

Functions and values

Function or value Description

choose chooser source

Full Usage: choose chooser source

Parameters:
    chooser : 'T -> 'U option - A function that is applied to each element in the collection and returns an option value. When the result is a Some then the unwrapped value is included in the result collection, otherwise it is discarded.
    source : ^Collection<'T> - The input collection.

Returns: ^Collection<'U> The result collection.
Modifiers: inline
Type parameters: 'T, 'U, ^Collection<'T>, ^Collection<'U>

Generic 'choose' for any collection. A combination of map and filter, `choose` enables you to transform and select elements at the same time.

chooser : 'T -> 'U option

A function that is applied to each element in the collection and returns an option value. When the result is a Some then the unwrapped value is included in the result collection, otherwise it is discarded.

source : ^Collection<'T>

The input collection.

Returns: ^Collection<'U>

The result collection.

InvalidOperationException Thrown when the input collection is an Id.

chunkBy projection source

Full Usage: chunkBy projection source

Parameters:
    projection : 'T -> 'Key - A function that transforms an element of the collection into a comparable key.
    source : ^Collection<'T> - The input collection.

Returns: ^Collection<'Key*'Collection<'T>> The result collection.
Modifiers: inline
Type parameters: 'T, 'Key, ^Collection<'T>, ^Collection<'Key * 'Collection<'T>>

Applies a key-generating function to each element of a collection and yields a collection of keys tupled with values. Each key contains a collection of all adjacent elements that match to this key, therefore keys are not unique but they can't be adjacent as each time the key changes, a new group is yield.

The ordering of the original collection is respected.

projection : 'T -> 'Key

A function that transforms an element of the collection into a comparable key.

source : ^Collection<'T>

The input collection.

Returns: ^Collection<'Key*'Collection<'T>>

The result collection.

distinct source

Full Usage: distinct source

Parameters:
    source : ^Collection<'T>when'T:equality - The input collection.

Returns: ^Collection<'T>when'T:equality The result collection.
Modifiers: inline
Type parameters: ^Collection<'T> when 'T : equality

Returns a collection that contains no duplicate entries according to generic hash and equality comparisons on the entries. If an element occurs multiple times in the collection then the later occurrences are discarded.

source : ^Collection<'T>when'T:equality

The input collection.

Returns: ^Collection<'T>when'T:equality

The result collection.

ArgumentNullException Thrown when the input collection is null.

distinctBy projection source

Full Usage: distinctBy projection source

Parameters:
    projection : 'T -> 'Key - A function transforming the collection items into comparable keys.
    source : ^Collection<'T> - The input collection.

Returns: ^Collection<'T> The result collection.
Modifiers: inline
Type parameters: 'T, 'Key, ^Collection<'T>

Returns a collection that contains no duplicate entries according to the generic hash and equality comparisons on the keys returned by the given key-generating function. If an element occurs multiple times in the collection then the later occurrences are discarded.

projection : 'T -> 'Key

A function transforming the collection items into comparable keys.

source : ^Collection<'T>

The input collection.

Returns: ^Collection<'T>

The result collection.

ArgumentNullException Thrown when the input collection is null.

drop count source

Full Usage: drop count source

Parameters:
    count : int - The number of items to drop.
    source : ^Collection<'T> - The input collection.

Returns: ^Collection<'T> The result collection.
Modifiers: inline
Type parameters: ^Collection<'T>

Returns a collection that drops N elements of the original collection and then yields the remaining elements of the collection.

When count exceeds the number of elements in the collection it returns an empty collection instead of throwing an exception.

count : int

The number of items to drop.

source : ^Collection<'T>

The input collection.

Returns: ^Collection<'T>

The result collection.

filter predicate source

Full Usage: filter predicate source

Parameters:
    predicate : 'T -> bool - The function to test the input elements.
    source : ^Collection<'T> - The input collection.

Returns: ^Collection<'T> A collection containing only the elements that satisfy the predicate.
Modifiers: inline
Type parameters: 'T, ^Collection<'T>

Returns a new collection containing only the elements of the collection for which the given predicate returns "true"

predicate : 'T -> bool

The function to test the input elements.

source : ^Collection<'T>

The input collection.

Returns: ^Collection<'T>

A collection containing only the elements that satisfy the predicate.

groupBy projection source

Full Usage: groupBy projection source

Parameters:
    projection : 'T -> 'Key - A function that transforms an element of the collection into a comparable key.
    source : ^Collection<'T> - The input collection.

Returns: ^Collection<'Key*'Collection<'T>> The result collection.
Modifiers: inline
Type parameters: 'T, 'Key, ^Collection<'T>, ^Collection<'Key * 'Collection<'T>>

Applies a key-generating function to each element of a collection and yields a collection of unique keys. Each unique key contains a collection of all elements that match to this key.

This function returns a collection that digests the whole initial collection as soon as that collection is iterated. As a result this function should not be used with large or infinite collections. The function makes no assumption on the ordering of the original collection.

projection : 'T -> 'Key

A function that transforms an element of the collection into a comparable key.

source : ^Collection<'T>

The input collection.

Returns: ^Collection<'Key*'Collection<'T>>

The result collection.

intersperse sep source

Full Usage: intersperse sep source

Parameters:
    sep : 'T
    source : ^Collection<'T>

Returns: ^Collection<'T>
Modifiers: inline
Type parameters: 'T, ^Collection<'T>

Inserts a separator between each element.

sep : 'T
source : ^Collection<'T>
Returns: ^Collection<'T>

limit count source

Full Usage: limit count source

Parameters:
    count : int - The maximum number of items to return.
    source : ^Collection<'T> - The input collection.

Returns: ^Collection<'T> The result collection.
Modifiers: inline
Type parameters: ^Collection<'T>

Returns a collection with at most N elements.

count : int

The maximum number of items to return.

source : ^Collection<'T>

The input collection.

Returns: ^Collection<'T>

The result collection.

ArgumentNullException Thrown when the input sequence is null.

ofList source

Full Usage: ofList source

Parameters:
    source : 'T list

Returns: ^Collection<'T>
Modifiers: inline
Type parameters: 'T, ^Collection<'T>

Converts to a Collection from a list.

source : 'T list
Returns: ^Collection<'T>

ofSeq source

Full Usage: ofSeq source

Parameters:
    source : seq<'T>

Returns: ^Collection<'T>
Modifiers: inline
Type parameters: 'T, ^Collection<'T>

Converts to a Collection from a seq.

source : seq<'T>
Returns: ^Collection<'T>

replace oldValue newValue source

Full Usage: replace oldValue newValue source

Parameters:
    oldValue : ^Collection - A collection that if part of the source collection should be replaced with newValue.
    newValue : ^Collection - The collection to replace oldValue with.
    source : ^Collection - The input collection.

Returns: ^Collection The resulting collection with oldValue replaced with newValue.
Modifiers: inline
Type parameters: ^Collection

Replaces part of the collection with a new part

oldValue : ^Collection

A collection that if part of the source collection should be replaced with newValue.

newValue : ^Collection

The collection to replace oldValue with.

source : ^Collection

The input collection.

Returns: ^Collection

The resulting collection with oldValue replaced with newValue.

rev source

Full Usage: rev source

Parameters:
    source : ^Collection<'T> - The input collection.

Returns: ^Collection<'T> The reversed collection.
Modifiers: inline
Type parameters: ^Collection<'T>

Returns a new collection with the elements in reverse order.

source : ^Collection<'T>

The input collection.

Returns: ^Collection<'T>

The reversed collection.

ArgumentNullException Thrown when the input collection is null.

scan folder state source

Full Usage: scan folder state source

Parameters:
    folder : 'State -> 'T -> 'State - A function that updates the state with each element from the collection.
    state : 'State - The initial state.
    source : ^Collection<'T> - The input collection.

Returns: ^Collection<'State> The resulting collection of computed states.
Modifiers: inline
Type parameters: 'State, 'T, ^Collection<'T>, ^Collection<'State>

Like fold, but computes on-demand and returns the collection of intermediary and final results.

folder : 'State -> 'T -> 'State

A function that updates the state with each element from the collection.

state : 'State

The initial state.

source : ^Collection<'T>

The input collection.

Returns: ^Collection<'State>

The resulting collection of computed states.

ArgumentNullException Thrown when the input collection is null.

skip count source

Full Usage: skip count source

Parameters:
    count : int - The number of items to skip.
    source : ^Collection<'T> - The input collection.

Returns: ^Collection<'T> The result collection.
Modifiers: inline
Type parameters: ^Collection<'T>

Returns a collection that skips N elements of the original collection and then yields the remaining elements of the collection.

Throws InvalidOperationException when count exceeds the number of elements in the collection. drop returns an empty collection instead of throwing an exception.

count : int

The number of items to skip.

source : ^Collection<'T>

The input collection.

Returns: ^Collection<'T>

The result collection.

ArgumentNullException Thrown when the input collection is null.
InvalidOperationException Thrown when count exceeds the number of elements in the collection.

skipWhile predicate source

Full Usage: skipWhile predicate source

Parameters:
    predicate : 'T -> bool - A function that evaluates to false when no more items should be skipped.
    source : ^Collection<'T> - The input collection.

Returns: ^Collection<'T> The result collection.
Modifiers: inline
Type parameters: 'T, ^Collection<'T>

Bypasses elements in a collection while the given predicate returns true, and then returns the remaining elements of the collection.

predicate : 'T -> bool

A function that evaluates to false when no more items should be skipped.

source : ^Collection<'T>

The input collection.

Returns: ^Collection<'T>

The result collection.

ArgumentNullException Thrown when the input collection is null.

sort source

Full Usage: sort source

Parameters:
    source : ^Collection<'T>when'T:comparison - The input collection.

Returns: ^Collection<'T>when'T:comparison The result collection.
Modifiers: inline
Type parameters: ^Collection<'T> when 'T : comparison

Returns a collection ordered by keys.

This function makes no assumption on the ordering of the original collection. This is a stable sort, that is the original order of equal elements is preserved.

source : ^Collection<'T>when'T:comparison

The input collection.

Returns: ^Collection<'T>when'T:comparison

The result collection.

ArgumentNullException Thrown when the input collection is null.

sortBy projection source

Full Usage: sortBy projection source

Parameters:
    projection : 'T -> 'Key - A function to transform items of the input collection into comparable keys.
    source : ^Collection<'T> - The input collection.

Returns: ^Collection<'T> The result collection.
Modifiers: inline
Type parameters: 'T, 'Key, ^Collection<'T>

Applies a key-generating function to each element of a collection and returns a collection ordered by keys. The keys are compared using generic comparison as implemented by Operators.compare.

This function makes no assumption on the ordering of the original collection. This is a stable sort, that is the original order of equal elements is preserved.

projection : 'T -> 'Key

A function to transform items of the input collection into comparable keys.

source : ^Collection<'T>

The input collection.

Returns: ^Collection<'T>

The result collection.

ArgumentNullException Thrown when the input collection is null.

sortByDescending projection source

Full Usage: sortByDescending projection source

Parameters:
    projection : 'T -> 'Key - A function to transform items of the input collection into comparable keys.
    source : ^Collection<'T> - The input collection.

Returns: ^Collection<'T> The result collection.
Modifiers: inline
Type parameters: 'T, 'Key, ^Collection<'T>

Yields a collection ordered descending by keys.

This function makes no assumption on the ordering of the original collection. This is a stable sort, that is the original order of equal elements is preserved.

projection : 'T -> 'Key

A function to transform items of the input collection into comparable keys.

source : ^Collection<'T>

The input collection.

Returns: ^Collection<'T>

The result collection.

ArgumentNullException Thrown when the input collection is null.

split sep source

Full Usage: split sep source

Parameters:
    sep : ''Collection<'OrderedCollection>
    source : ^OrderedCollection

Returns: ''Collection<'OrderedCollection>
Modifiers: inline
Type parameters: ''Collection<'OrderedCollection>, ^OrderedCollection

Splits a given ordered collection at each of the given sub-ordered collections

sep : ''Collection<'OrderedCollection>
source : ^OrderedCollection
Returns: ''Collection<'OrderedCollection>
Example

 > "asdf" |> split ["s"];;
 val it : string list = ["a"; "df"]

 > [1;2;3;4;5;6;7] |> split [ [2;3]; [5] ];;
 val it : int list list = [[1]; [4]; [6; 7]]
Multiple items
val string: value: 'T -> string

--------------------
type string = System.String
type 'T list = List<'T>
Multiple items
val int: value: 'T -> int (requires member op_Explicit)

--------------------
type int = int32

--------------------
type int<'Measure> = int

take count source

Full Usage: take count source

Parameters:
    count : int - The number of items to take.
    source : ^Collection<'T> - The input collection.

Returns: ^Collection<'T> The result collection.
Modifiers: inline
Type parameters: ^Collection<'T>

Gets the first N elements of the collection.

Throws InvalidOperationException if the count exceeds the number of elements in the collection. limit returns as many items as the collection contains instead of throwing an exception.

count : int

The number of items to take.

source : ^Collection<'T>

The input collection.

Returns: ^Collection<'T>

The result collection.

ArgumentNullException Thrown when the input collection is null.
ArgumentException Thrown when the input collection is empty.
InvalidOperationException Thrown when count exceeds the number of elements in the collection.

takeWhile predicate source

Full Usage: takeWhile predicate source

Parameters:
    predicate : 'T -> bool - A function that evaluates to false when no more items should be returned.
    source : ^Collection<'T> - The input collection.

Returns: ^Collection<'T> The result collection.
Modifiers: inline
Type parameters: 'T, ^Collection<'T>

Returns a collection that contains all elements of the original collection while the given predicate returns true, and then returns no further elements.

predicate : 'T -> bool

A function that evaluates to false when no more items should be returned.

source : ^Collection<'T>

The input collection.

Returns: ^Collection<'T>

The result collection.

ArgumentNullException Thrown when the input collection is null.

Tuple

Functions and values

Function or value Description

item1 tuple

Full Usage: item1 tuple

Parameters:
    tuple : ^h

Returns: 'i
Modifiers: inline
Type parameters: ^h, 'i

Gets the value of the first component of a tuple.

tuple : ^h
Returns: 'i

item2 tuple

Full Usage: item2 tuple

Parameters:
    tuple : ^h

Returns: 'i
Modifiers: inline
Type parameters: ^h, 'i

Gets the value of the second component of a tuple.

tuple : ^h
Returns: 'i

item3 tuple

Full Usage: item3 tuple

Parameters:
    tuple : ^h

Returns: 'i
Modifiers: inline
Type parameters: ^h, 'i

Gets the value of the third component of a tuple.

tuple : ^h
Returns: 'i

item4 tuple

Full Usage: item4 tuple

Parameters:
    tuple : ^h

Returns: 'i
Modifiers: inline
Type parameters: ^h, 'i

Gets the value of the fourth component of a tuple.

tuple : ^h
Returns: 'i

item5 tuple

Full Usage: item5 tuple

Parameters:
    tuple : ^h

Returns: 'i
Modifiers: inline
Type parameters: ^h, 'i

Gets the value of the fifth component of a tuple.

tuple : ^h
Returns: 'i

mapItem1 mapping tuple

Full Usage: mapItem1 mapping tuple

Parameters:
    mapping : 'T -> 'U
    tuple : ^('T*..)

Returns: '('U*..)
Modifiers: inline
Type parameters: 'T, 'U, ^('T * ..), '('U * ..)

Maps the first value of a tuple.

mapping : 'T -> 'U
tuple : ^('T*..)
Returns: '('U*..)

mapItem2 mapping tuple

Full Usage: mapItem2 mapping tuple

Parameters:
    mapping : 'T -> 'U
    tuple : ^('A*'T*..)

Returns: '('A*'U*..)
Modifiers: inline
Type parameters: 'T, 'U, ^('A * 'T * ..), '('A * 'U * ..)

Maps the second value of a tuple.

mapping : 'T -> 'U
tuple : ^('A*'T*..)
Returns: '('A*'U*..)

mapItem3 mapping tuple

Full Usage: mapItem3 mapping tuple

Parameters:
    mapping : 'T -> 'U
    tuple : ^('A*'B*'T*..)

Returns: '('A*'B*'U*..)
Modifiers: inline
Type parameters: 'T, 'U, ^('A * 'B * 'T * ..), '('A * 'B * 'U * ..)

Maps the third value of a tuple.

mapping : 'T -> 'U
tuple : ^('A*'B*'T*..)
Returns: '('A*'B*'U*..)

mapItem4 mapping tuple

Full Usage: mapItem4 mapping tuple

Parameters:
    mapping : 'T -> 'U
    tuple : ^('A*'B*'C*'T*..)

Returns: '('A*'B*'C*'U*..)
Modifiers: inline
Type parameters: 'T, 'U, ^('A * 'B * 'C * 'T * ..), '('A * 'B * 'C * 'U * ..)

Maps the fourth value of a tuple.

mapping : 'T -> 'U
tuple : ^('A*'B*'C*'T*..)
Returns: '('A*'B*'C*'U*..)

mapItem5 mapping tuple

Full Usage: mapItem5 mapping tuple

Parameters:
    mapping : 'T -> 'U
    tuple : ^('A*'B*'C*'D*'T*..)

Returns: '('A*'B*'C*'D*'U*..)
Modifiers: inline
Type parameters: 'T, 'U, ^('A * 'B * 'C * 'D * 'T * ..), '('A * 'B * 'C * 'D * 'U * ..)

Maps the fifth value of a tuple.

mapping : 'T -> 'U
tuple : ^('A*'B*'C*'D*'T*..)
Returns: '('A*'B*'C*'D*'U*..)

Converter

Functions and values

Function or value Description

explicit value

Full Usage: explicit value

Parameters:
    value : ^T

Returns: ^U
Modifiers: inline
Type parameters: ^T, ^U

Converts using the explicit operator.

value : ^T
Returns: ^U

ofBytes value

Full Usage: ofBytes value

Parameters:
    value : byte[]

Returns: ^T
Modifiers: inline
Type parameters: ^T

Convert from a byte array value, assuming little-endian

value : byte[]
Returns: ^T

ofBytesBE value

Full Usage: ofBytesBE value

Parameters:
    value : byte[]

Returns: ^T
Modifiers: inline
Type parameters: ^T

Convert from a byte array value, assuming big-endian

value : byte[]
Returns: ^T

ofBytesWithOptions isLtEndian startIndex value

Full Usage: ofBytesWithOptions isLtEndian startIndex value

Parameters:
    isLtEndian : bool
    startIndex : int
    value : byte[]

Returns: ^T
Modifiers: inline
Type parameters: ^T

Convert from a byte array value, given options of little-endian, and startIndex

isLtEndian : bool
startIndex : int
value : byte[]
Returns: ^T

parse value

Full Usage: parse value

Parameters:
    value : string

Returns: ^T
Modifiers: inline
Type parameters: ^T

Converts to a value from its string representation.

value : string
Returns: ^T

toBytes value

Full Usage: toBytes value

Parameters:
    value : ^a

Returns: byte[]
Modifiers: inline

Convert to a byte array value, assuming little endian

value : ^a
Returns: byte[]

toBytesBE value

Full Usage: toBytesBE value

Parameters:
    value : ^a

Returns: byte[]
Modifiers: inline

Convert to a byte array value, assuming big endian

value : ^a
Returns: byte[]

tryParse value

Full Usage: tryParse value

Parameters:
    value : string

Returns: ^T option
Modifiers: inline
Type parameters: ^T

Converts to a value from its string representation. Returns None if the convertion doesn't succeed.

value : string
Returns: ^T option

Numerics

Functions and values

Function or value Description

abs value

Full Usage: abs value

Parameters:
    value : ^Num - The input value.

Returns: ^Num The absolute value of the input.
Modifiers: inline
Type parameters: ^Num

Gets the absolute value of the given number.

Rule: signum x * abs x = x

value : ^Num

The input value.

Returns: ^Num

The absolute value of the input.

abs' value

Full Usage: abs' value

Parameters:
    value : ^Num - The input value.

Returns: ^Num The absolute value of the input.
Modifiers: inline
Type parameters: ^Num

Gets the absolute value of the given number. Works also for unsigned types.

Rule: signum x * abs x = x

value : ^Num

The input value.

Returns: ^Num

The absolute value of the input.

div dividend divisor

Full Usage: div dividend divisor

Parameters:
    dividend : ^Num
    divisor : ^Num

Returns: ^Num
Modifiers: inline
Type parameters: ^Num

Division between two numbers. If the numbers are not divisible throws an error.

dividend : ^Num
divisor : ^Num
Returns: ^Num

divRem dividend divisor

Full Usage: divRem dividend divisor

Parameters:
    dividend : ^Num
    divisor : ^Num

Returns: ^Num * ^Num
Modifiers: inline
Type parameters: ^Num

Divides one number by another, returns a tuple with the result and the remainder.

dividend : ^Num
divisor : ^Num
Returns: ^Num * ^Num

fromBigInt x

Full Usage: fromBigInt x

Parameters:
    x : bigint

Returns: ^Num
Modifiers: inline
Type parameters: ^Num

Converts from BigInteger to the inferred destination type.

x : bigint
Returns: ^Num

getMaxValue ()

Full Usage: getMaxValue ()

Parameters:
    () : unit

Returns: ^a
Modifiers: inline

Gets the largest possible value.

() : unit
Returns: ^a

getMinValue ()

Full Usage: getMinValue ()

Parameters:
    () : unit

Returns: ^a
Modifiers: inline

Gets the smallest possible value.

() : unit
Returns: ^a

getOne ()

Full Usage: getOne ()

Parameters:
    () : unit

Returns: ^b
Modifiers: inline
Type parameters: ^b

Gets a value that represents the number 1 (one).

() : unit
Returns: ^b

getPi ()

Full Usage: getPi ()

Parameters:
    () : unit

Returns: ^Floating
Modifiers: inline
Type parameters: ^Floating

Gets the pi number.

() : unit
Returns: ^Floating

isqrt x

Full Usage: isqrt x

Parameters:
    x : ^Integral

Returns: ^Integral
Modifiers: inline
Type parameters: ^Integral

Square root of an integral number.

x : ^Integral
Returns: ^Integral

maxValue

Full Usage: maxValue

Returns: ^Num
Modifiers: inline
Type parameters: ^Num

The largest possible value.

Returns: ^Num

minValue

Full Usage: minValue

Returns: ^Num
Modifiers: inline
Type parameters: ^Num

The smallest possible value.

Returns: ^Num

negate x

Full Usage: negate x

Parameters:
    x : ^Num

Returns: ^Num
Modifiers: inline
Type parameters: ^Num

Additive inverse of the number.

x : ^Num
Returns: ^Num

negate' x

Full Usage: negate' x

Parameters:
    x : ^Num

Returns: ^Num
Modifiers: inline
Type parameters: ^Num

Additive inverse of the number.

x : ^Num
Returns: ^Num

one

Full Usage: one

Returns: ^Num
Modifiers: inline
Type parameters: ^Num

A value that represents the 1 element.

Returns: ^Num

pi

Full Usage: pi

Returns: ^Num
Modifiers: inline
Type parameters: ^Num

The pi number.

Returns: ^Num

signum value

Full Usage: signum value

Parameters:
    value : ^Num - The input value.

Returns: ^Num -1, 0, or 1 depending on the sign of the input.
Modifiers: inline
Type parameters: ^Num

Sign of the given number

Rule: signum x * abs x = x

value : ^Num

The input value.

Returns: ^Num

-1, 0, or 1 depending on the sign of the input.

signum' value

Full Usage: signum' value

Parameters:
    value : ^Num - The input value.

Returns: ^Num -1, 0, or 1 depending on the sign of the input.
Modifiers: inline
Type parameters: ^Num

Sign of the given number Works also for unsigned types.

Rule: signum x * abs x = x

value : ^Num

The input value.

Returns: ^Num

-1, 0, or 1 depending on the sign of the input.

sqrt x

Full Usage: sqrt x

Parameters:
    x : ^a

Returns: ^a
Modifiers: inline

Square root of a number of any type. Throws an exception if there is no square root.

x : ^a
Returns: ^a

sqrtRem x

Full Usage: sqrtRem x

Parameters:
    x : ^Integral

Returns: ^Integral * ^Integral
Modifiers: inline
Type parameters: ^Integral

Square root of an integral number.

x : ^Integral
Returns: ^Integral * ^Integral

subtract x y

Full Usage: subtract x y

Parameters:
    x : ^Num
    y : ^Num

Returns: ^Num
Modifiers: inline
Type parameters: ^Num

Subtraction between two numbers. Throws an error if the result is negative on unsigned types.

x : ^Num
y : ^Num
Returns: ^Num

toBigInt x

Full Usage: toBigInt x

Parameters:
    x : ^Integral

Returns: bigint
Modifiers: inline
Type parameters: ^Integral

Converts to BigInteger.

x : ^Integral
Returns: bigint

tryDiv dividend divisor

Full Usage: tryDiv dividend divisor

Parameters:
    dividend : ^Num
    divisor : ^Num

Returns: ^Num option
Modifiers: inline
Type parameters: ^Num

Division between two numbers. Returns None if the numbers are not divisible.

dividend : ^Num
divisor : ^Num
Returns: ^Num option

tryNegate' x

Full Usage: tryNegate' x

Parameters:
    x : ^Num

Returns: ^Num option
Modifiers: inline
Type parameters: ^Num

Additive inverse of the number. Works also for unsigned types (Returns none if there is no inverse).

x : ^Num
Returns: ^Num option

trySqrt x

Full Usage: trySqrt x

Parameters:
    x : ^a

Returns: ^a option
Modifiers: inline

Square root of a number of any type. Returns None if there is no square root.

x : ^a
Returns: ^a option

trySubtract x y

Full Usage: trySubtract x y

Parameters:
    x : ^Num
    y : ^Num

Returns: ^Num option
Modifiers: inline
Type parameters: ^Num

Subtraction between two numbers. Returns None if the result is negative on unsigned types.

x : ^Num
y : ^Num
Returns: ^Num option

Additional Functions

Functions and values

Function or value Description

choice x

Full Usage: choice x

Parameters:
    x : ^Foldable<'Alternative<'T>>

Returns: 'Alternative<'T>>
Modifiers: inline
Type parameters: ^Foldable<'Alternative<'T>>, 'Alternative<'T>>

Reduces using alternative operator `<|>`.

x : ^Foldable<'Alternative<'T>>
Returns: 'Alternative<'T>>

dispose resource

Full Usage: dispose resource

Parameters:

Safely dispose a resource (includes null-checking).

resource : IDisposable

implicit x

Full Usage: implicit x

Parameters:
    x : ^T

Returns: ^R
Modifiers: inline
Type parameters: ^T, ^R

Converts using the implicit operator.

x : ^T
Returns: ^R

mfilter predicate m

Full Usage: mfilter predicate m

Parameters:
    predicate : 'T -> bool
    m : ^MonadZero<'T>

Returns: ^MonadZero<'T>
Modifiers: inline
Type parameters: 'T, ^MonadZero<'T>

Generic filter operation for MonadZero. It returns all values satisfying the predicate, if the predicate returns false will use the empty value.

predicate : 'T -> bool
m : ^MonadZero<'T>
Returns: ^MonadZero<'T>

sum x

Full Usage: sum x

Parameters:
    x : ^Foldable<'Monoid>

Returns: ^Monoid
Modifiers: inline
Type parameters: ^Foldable<'Monoid>, ^Monoid

Folds the sum of all monoid elements in the Foldable.

x : ^Foldable<'Monoid>
Returns: ^Monoid

Active patterns

Active pattern Description

(|Parsed|_|) str

Full Usage: (|Parsed|_|) str

Parameters:
    str : string

Returns: ^T option
Modifiers: inline
Type parameters: ^T

An active recognizer for a generic value parser.

str : string
Returns: ^T option

Other module members

Functions and values

Function or value Description

foldBack folder foldable state

Full Usage: foldBack folder foldable state

Parameters:
    folder : 'T -> 'State -> 'State
    foldable : ^Foldable<'T>
    state : 'State

Returns: 'State
Modifiers: inline
Type parameters: 'T, 'State, ^Foldable<'T>

Foldable

Applies a function to each element of the foldable, starting from the end, threading an accumulator argument through the computation. If the input function is f and the elements are i0...iN then computes f i0 (...(f iN s)). Foldable The function to update the state given the input elements. The input foldable. The initial state. The state object after the folding function is applied to each element of the foldable.

folder : 'T -> 'State -> 'State
foldable : ^Foldable<'T>
state : 'State
Returns: 'State

tuple6 t1 t2 t3 t4 t5 t6

Full Usage: tuple6 t1 t2 t3 t4 t5 t6

Parameters:
    t1 : 'T1
    t2 : 'T2
    t3 : 'T3
    t4 : 'T4
    t5 : 'T5
    t6 : 'T6

Returns: 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6
Modifiers: inline
Type parameters: 'T1, 'T2, 'T3, 'T4, 'T5, 'T6

Tuple six arguments Common Combinators

t1 : 'T1
t2 : 'T2
t3 : 'T3
t4 : 'T4
t5 : 'T5
t6 : 'T6
Returns: 'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'T6