# Either

> [`Tango.Modules.EitherModule`](https://github.com/gabrielschade/Tango/blob/master/Tango/Tango/Modules/Either/EitherModule.cs)
>
> [`Tango.Modules.Either.Linq`](https://github.com/gabrielschade/Tango/blob/master/Tango/Tango/Modules/Either/Either.Linq.cs)

This module provides several methods to works with [`Either<TLeft, TRight>`](https://github.com/gabrielschade/tango/tree/379cc4a38ae47796971eb875ec66e7dc053a9081/Types/Either/Introduction.html) type.

Many methods has an `Left` and `Right` version, these versions are used to apply the function only to one of possible types. This variants will be mentioned in each method page.

When possible, the examples will use the extension method format, all of them can be replaced by module method without change any behavior.

> **WARNING**
>
> Some methods has different parameter order in extension and module versions. It occurs because the _static_ methods in modules are optimized to partial application rather than extension methods that wants to improve usability to make a similar `System.Linq` sintax.

## Methods

* [Exists](https://github.com/gabrielschade/tango/tree/379cc4a38ae47796971eb875ec66e7dc053a9081/Modules/Either/exists.html)
* [Iterate](https://github.com/gabrielschade/tango/tree/379cc4a38ae47796971eb875ec66e7dc053a9081/Modules/Either/iterate.html)
* [Fold](https://github.com/gabrielschade/tango/tree/379cc4a38ae47796971eb875ec66e7dc053a9081/Modules/Either/fold.html)
* [FoldBack](https://github.com/gabrielschade/tango/tree/379cc4a38ae47796971eb875ec66e7dc053a9081/Modules/Either/foldback.html)
* [Map](https://github.com/gabrielschade/tango/tree/379cc4a38ae47796971eb875ec66e7dc053a9081/Modules/Either/map.html)
* [Swap](https://github.com/gabrielschade/tango/tree/379cc4a38ae47796971eb875ec66e7dc053a9081/Modules/Either/swap.html)
* [ToTuple](https://github.com/gabrielschade/tango/tree/379cc4a38ae47796971eb875ec66e7dc053a9081/Modules/Either/totuple.html)
