If you're new to this library, you may need a few pointers of where to look for features:
-
Preludeis 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, thePreludetype 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 seePreludein 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 (or in your global usings):
using static LanguageExt.Prelude;This makes all functions in the
Preludeavailable as though they were local. -
Traitsare the powerhouse of this library and allow for true higher-kinded abstract behviours to be leveraged throughout. The topic of traits is huge, so if you're looking for an introduction, take a look at Paul Louth's Higher Kinds series on his blog. -
Monadscontains the common monads likeOption<A>andEither<L, R>, as well as state-managing monads likeReader,Writer, andState. It also is home to many monad-transformers (types with aTsuffix, likeOptionT). Transformers allow 'stacking' of monadic effects into 'super monads'. -
Immutable Collectionscontains the high-performance functional collection types this library is famous for. -
Effectsis where the pure IO functionality of language-ext resides. It is also where you'll find theStreamTfor 'effectful' streaming. To understand more about how to deal with side-effects, check the wiki. -
Concurrencyis where you'll find lots of help in atomically managing shared data without locks.