If you're new to this library, you may need a few pointers of where to look for features:
Prelude
is astatic partial class
, this type is loaded with functions for constructing the key data types, as well as many of the things you'd expect in a functional programming language's prelude. Note, thePrelude
type extends into many other parts of the source-tree. It's the same type, but spread all over the code-base. And so, you may seePrelude
in other areas of the documentation: it's the same type.Because it's so fundamental, you'll want to add this to the top of every code file:
using static LanguageExt.Prelude;
This makes all of the functions in the
Prelude
available as though they were local.Monads
contains the common monads likeOption<A>
andEither<L, R>
, as well as state-managing monads likeReader
,Writer
, andState
.Immutable Collections
contains the high-performance functional collection types this library is famous for.Effects
is where the pure IO functionality of language-ext resides. It is also where you'll find thePipes
compositional streaming functionality. To understand more about how to deal with side-effects, check the wiki.Concurrency
is where you'll find lots of help in atomically managing shared data without locks.
- CatchValue <A> (Func<Error, bool> Match, Func<Error, A> Value)
- CatchValue <E, A> (Func<E, bool> Match, Func<E, A> Value)
- CatchError (Func<Error, bool> Match, Func<Error, Error> Value)
- CatchError <E> (Func<E, bool> Match, Func<E, E> Value)
- CatchIO <A> (Func<Error, bool> Match, Func<Error, IO<A>> Value)
- CatchIO <E, A> (Func<E, bool> Match, Func<E, IO<A>> Value)
- CatchM <M, A> (Func<Error, bool> Match, Func<Error, K<M, A>> Value)
- CatchM <M, E, A> (Func<E, bool> Match, Func<E, K<M, A>> Value)
- CombinatorsDynamic
- I = (dynamic x) => x
- M = (dynamic x) => (dynamic a) => x(x(a))
- K = (dynamic x) => (dynamic y) => x
- T = (dynamic x) => (dynamic y) => y(x)
- Q = (dynamic x) => (dynamic y) => (dynamic z) => y(x(z))
- S = (dynamic x) => (dynamic y) => (dynamic z) => x(z)(y(z))
- Y = (dynamic f) => (dynamic x) => f(Y(f), x)
- Combinators <A>
- Combinators <A, B>
- Combinators <A, B, C>
- Q = (Func<A, B> x) => (Func<B, C> y) => (A z) => y(x(z))
- S = (Func<A, Func<B, C>> x) => (Func<A, B> y) => (A z) => x(z)(y(z))
- Y = (Func<Func<A, B>, A, B> f) => (A x) => f(Y(f), x)
- Combinators
- I <A> (A x)
- K <A, B> (A x)
- M <A> (Func<A, A> x)
- T <A, B> (A x)
- Q <A, B, C> (Func<A, B> x)
- S <A, B, C> (Func<A, B, C> x)
- Guard <E, A>
- Flag
- Cast <B> ()
- OnFalse
- SelectMany <C> (Func<E, Guard<E, Unit>> bind, Func<Unit, Unit, C> project)
- Select <B> (Func<B, B> _)
- ToTransducer ()
- ToEither ()
- Bind <B> (Func<Unit, Either<E, B>> f)
- SelectMany <B, C> ( Func<Unit, Either<E, B>> bind, Func<Unit, B, C> project)
- GuardExtensions
- Bind <B> ( this Guard<Error, Unit> guard, Func<Unit, IO<B>> f)
- SelectMany <B, C> ( this Guard<Error, Unit> guard, Func<Unit, IO<B>> bind, Func<Unit, B, C> project)
- ToIO (this Guard<Error, Unit> guard)
- ToEff (this Guard<Error, Unit> guard)
- Bind <B> ( this Guard<Error, Unit> guard, Func<Unit, Eff<B>> f)
- SelectMany <B, C> ( this Guard<Error, Unit> guard, Func<Unit, Eff<B>> bind, Func<Unit, B, C> project)
- ToEff <RT> (this Guard<Error, Unit> guard)
- Bind <RT, B> ( this Guard<Error, Unit> guard, Func<Unit, Eff<RT, B>> f)
- SelectMany <RT, B, C> ( this Guard<Error, Unit> guard, Func<Unit, Eff<RT, B>> bind, Func<Unit, B, C> project)
- ToValidation <F> (this Guard<F, Unit> guard)
- Bind <F, B> ( this Guard<F, Unit> guard, Func<Unit, Validation<F, B>> f)
- SelectMany <F, B, C> ( this Guard<F, Unit> guard, Func<Unit, Validation<F, B>> bind, Func<Unit, B, C> project)
- Number <A>
Sub modules
record CatchValue <A> (Func<Error, bool> Match, Func<Error, A> Value) Source #
Used by @catch
, @exceptional
, @expected
to represent the catching of errors
record CatchValue <E, A> (Func<E, bool> Match, Func<E, A> Value) Source #
Used by @catch
, @exceptional
, @expected
to represent the catching of errors
record CatchError (Func<Error, bool> Match, Func<Error, Error> Value) Source #
Used by @catch
, @exceptional
, @expected
to represent the catching of errors
record CatchError <E> (Func<E, bool> Match, Func<E, E> Value) Source #
Used by @catch
, @exceptional
, @expected
to represent the catching of errors
record CatchIO <A> (Func<Error, bool> Match, Func<Error, IO<A>> Value) Source #
Used by @catch
, @exceptional
, @expected
to represent the catching of errors
record CatchIO <E, A> (Func<E, bool> Match, Func<E, IO<A>> Value) Source #
Used by @catch
, @exceptional
, @expected
to represent the catching of errors
record CatchM <M, A> (Func<Error, bool> Match, Func<Error, K<M, A>> Value) Source #
Used by @catch
, @exceptional
, @expected
to represent the catching of errors
record CatchM <M, E, A> (Func<E, bool> Match, Func<E, K<M, A>> Value) Source #
Used by @catch
, @exceptional
, @expected
to represent the catching of errors
class CombinatorsDynamic Source #
field Func<dynamic, dynamic> I = (dynamic x) => x Source #
Identity function, or the Idiot bird dkeenan.com/Lambda/
field Func<dynamic, Func<dynamic, dynamic>> M = (dynamic x) => (dynamic a) => x(x(a)) Source #
The Mockingbird dkeenan.com/Lambda/
field Func<dynamic, Func<dynamic, dynamic>> K = (dynamic x) => (dynamic y) => x Source #
The Kestrel dkeenan.com/Lambda/
field Func<dynamic, Func<dynamic, dynamic>> T = (dynamic x) => (dynamic y) => y(x) Source #
The Thrush dkeenan.com/Lambda/
field Func<dynamic, Func<dynamic, Func<dynamic, dynamic>>> Q = (dynamic x) => (dynamic y) => (dynamic z) => y(x(z)) Source #
The Queer bird dkeenan.com/Lambda/
field Func<dynamic, Func<dynamic, Func<dynamic, dynamic>>> S = (dynamic x) => (dynamic y) => (dynamic z) => x(z)(y(z)) Source #
The Starling dkeenan.com/Lambda/
field Func<dynamic, Func<dynamic, dynamic>> Y = (dynamic f) => (dynamic x) => f(Y(f), x) Source #
The infamous Y-combinator, or Sage bird dkeenan.com/Lambda/
class Combinators <A> Source #
field Func<A, A> I = (A x) => x Source #
Identity function, or the Idiot bird dkeenan.com/Lambda/
field Func<Func<A, A>, Func<A, A>> M = (Func<A, A> x) => a => x(x(a)) Source #
The Mockingbird dkeenan.com/Lambda/
class Combinators <A, B> Source #
field Func<A, Func<B, A>> K = (A x) => (B y) => x Source #
The Kestrel dkeenan.com/Lambda/
field Func<A, Func<Func<A, B>, B>> T = (A x) => (Func<A, B> y) => y(x) Source #
The Thrush dkeenan.com/Lambda/
class Combinators <A, B, C> Source #
field Func<Func<A, B>, Func<Func<B, C>, Func<A, C>>> Q = (Func<A, B> x) => (Func<B, C> y) => (A z) => y(x(z)) Source #
The Queer bird dkeenan.com/Lambda/
field Func<Func<A, Func<B, C>>, Func<Func<A, B>, Func<A, C>>> S = (Func<A, Func<B, C>> x) => (Func<A, B> y) => (A z) => x(z)(y(z)) Source #
The Starling dkeenan.com/Lambda/
field Func<Func<Func<A, B>, A, B>, Func<A, B>> Y = (Func<Func<A, B>, A, B> f) => (A x) => f(Y(f), x) Source #
The infamous Y-combinator, or Sage bird dkeenan.com/Lambda/
class Combinators Source #
Identity function, or the Idiot bird dkeenan.com/Lambda/
method Func<B, A> K <A, B> (A x) Source #
The Kestrel dkeenan.com/Lambda/
method Func<A, A> M <A> (Func<A, A> x) Source #
The Mockingbird dkeenan.com/Lambda/
method Func<Func<A, B>, B> T <A, B> (A x) Source #
The Thrush dkeenan.com/Lambda/
method Func<Func<B, C>, Func<A, C>> Q <A, B, C> (Func<A, B> x) Source #
The Queer bird dkeenan.com/Lambda/
method Func<Func<A, B>, Func<A, C>> S <A, B, C> (Func<A, B, C> x) Source #
The Starling dkeenan.com/Lambda/
Used by various error producing monads to have a contextual where
See Prelude.guard(...)
method Guard<E, C> SelectMany <C> (Func<E, Guard<E, Unit>> bind, Func<Unit, Unit, C> project) Source #
method Transducer<Unit, Sum<E, Unit>> ToTransducer () Source #
method Either<E, B> Bind <B> (Func<Unit, Either<E, B>> f) Source #
Monadic binding support for Either
method Either<E, C> SelectMany <B, C> ( Func<Unit, Either<E, B>> bind, Func<Unit, B, C> project) Source #
Monadic binding SelectMany
extension for Guard
class GuardExtensions Source #
method IO<B> Bind <B> ( this Guard<Error, Unit> guard, Func<Unit, IO<B>> f) Source #
Monadic binding support for Eff
method IO<C> SelectMany <B, C> ( this Guard<Error, Unit> guard, Func<Unit, IO<B>> bind, Func<Unit, B, C> project) Source #
Monadic binding support for Eff
method Eff<B> Bind <B> ( this Guard<Error, Unit> guard, Func<Unit, Eff<B>> f) Source #
Monadic binding support for Eff
method Eff<C> SelectMany <B, C> ( this Guard<Error, Unit> guard, Func<Unit, Eff<B>> bind, Func<Unit, B, C> project) Source #
Monadic binding support for Eff
method Eff<RT, Unit> ToEff <RT> (this Guard<Error, Unit> guard) Source #
Natural transformation to Eff
method Eff<RT, B> Bind <RT, B> ( this Guard<Error, Unit> guard, Func<Unit, Eff<RT, B>> f) Source #
Monadic binding support for Eff
method Eff<RT, C> SelectMany <RT, B, C> ( this Guard<Error, Unit> guard, Func<Unit, Eff<RT, B>> bind, Func<Unit, B, C> project) Source #
Monadic binding support for Eff
method Validation<F, Unit> ToValidation <F> (this Guard<F, Unit> guard) Source #
Natural transformation to Validation
method Validation<F, B> Bind <F, B> ( this Guard<F, Unit> guard, Func<Unit, Validation<F, B>> f) Source #
Monadic binding support for Validation
method Validation<F, C> SelectMany <F, B, C> ( this Guard<F, Unit> guard, Func<Unit, Validation<F, B>> bind, Func<Unit, B, C> project) Source #
Monadic binding support for Validation
Num<A>
trait for INumber<A>
type | A |
method int GetHashCode (A x) Source #
method A FromInteger (int x) Source #
method A FromDecimal (decimal x) Source #
method A FromDouble (double x) Source #