FSharpx.Extras


Funcs Type

Extensions around Actions and Funcs

Static members

Static member Description

Funcs.AndThen(f, g)

Full Usage: Funcs.AndThen(f, g)

Parameters:
Returns: Func<'a, 'c>

Composes two functions (forward composition). Mathematically: g . f

f : Func<'a, 'b>
g : Func<'b, 'c>
Returns: Func<'a, 'c>

Funcs.Compose(f, g)

Full Usage: Funcs.Compose(f, g)

Parameters:
Returns: Func<'c, 'b>

Composes two functions. Mathematically: f . g

f : Func<'a, 'b>
g : Func<'c, 'a>
Returns: Func<'c, 'b>

Funcs.Curry(f)

Full Usage: Funcs.Curry(f)

Parameters:
    f : Func<'a, 'b, 'c, 'd>

Returns: Func<'a, Func<'b, Func<'c, 'd>>>

Converts an uncurried function to a curried function

f : Func<'a, 'b, 'c, 'd>
Returns: Func<'a, Func<'b, Func<'c, 'd>>>

Funcs.Curry(f)

Full Usage: Funcs.Curry(f)

Parameters:
    f : Func<'a, 'b, 'c>

Returns: Func<'a, Func<'b, 'c>>

Converts an uncurried function to a curried function

f : Func<'a, 'b, 'c>
Returns: Func<'a, Func<'b, 'c>>

Funcs.ToFunc(f)

Full Usage: Funcs.ToFunc(f)

Parameters:
Returns: Func<'a, 'b, 'c, unit>

Converts an action to a function returning Unit

f : Action<'a, 'b, 'c>
Returns: Func<'a, 'b, 'c, unit>

Funcs.ToFunc(a)

Full Usage: Funcs.ToFunc(a)

Parameters:
Returns: Func<'a, 'b, unit>

Converts an action to a function returning Unit

a : Action<'a, 'b>
Returns: Func<'a, 'b, unit>

Funcs.ToFunc(a)

Full Usage: Funcs.ToFunc(a)

Parameters:
Returns: Func<'a, unit>

Converts an action to a function returning Unit

a : Action<'a>
Returns: Func<'a, unit>

Funcs.ToFunc(a)

Full Usage: Funcs.ToFunc(a)

Parameters:
Returns: Func<unit>

Converts an action to a function returning Unit

a : Action
Returns: Func<unit>

Funcs.Tuple(f)

Full Usage: Funcs.Tuple(f)

Parameters:
Returns: Action<'a * 'b * 'c * 'd>

Converts an action with 4 arguments into an action taking a 4-tuple

f : Action<'a, 'b, 'c, 'd>
Returns: Action<'a * 'b * 'c * 'd>

Funcs.Tuple(f)

Full Usage: Funcs.Tuple(f)

Parameters:
Returns: Action<'a * 'b * 'c>

Converts an action with 3 arguments into an action taking a 3-tuple

f : Action<'a, 'b, 'c>
Returns: Action<'a * 'b * 'c>

Funcs.Tuple(f)

Full Usage: Funcs.Tuple(f)

Parameters:
Returns: Action<'a * 'b>

Converts an action with 2 arguments into an action taking a 2-tuple

f : Action<'a, 'b>
Returns: Action<'a * 'b>

Funcs.Untuple(f)

Full Usage: Funcs.Untuple(f)

Parameters:
    f : Action<'a * 'b * 'c * 'd>

Returns: Action<'a, 'b, 'c, 'd>

Converts an action taking a 4-tuple into an action with 4 parameters

f : Action<'a * 'b * 'c * 'd>
Returns: Action<'a, 'b, 'c, 'd>

Funcs.Untuple(f)

Full Usage: Funcs.Untuple(f)

Parameters:
Returns: Action<'a, 'b, 'c>

/// Converts an action taking a 3-tuple into an action with 3 parameters

f : Action<'a * 'b * 'c>
Returns: Action<'a, 'b, 'c>

Funcs.Untuple(f)

Full Usage: Funcs.Untuple(f)

Parameters:
Returns: Action<'a, 'b>

Converts an action taking a 2-tuple into an action with 2 parameters

f : Action<'a * 'b>
Returns: Action<'a, 'b>