GreanTech/Qaiain — pull request #27 by moodmosaic (2014-08-11 08:26:27+00:00)
Title: Used FSharpx.Core instead of Result<'TSuccess, 'TFailure> – refactored a nested pattern matching

Related to #6, and more specifically to this [comment](https://github.com/GreanTech/Qaiain/issues/6#issuecomment-51312114).

This Pull Request replaces the custom `Result<'TSuccess, 'TFailure>` type with the built-in `Choice<'T1, 'T2>` – the monadic type of the [`choose`](https://github.com/fsprojects/fsharpx/blob/9ad7ff3024b1cc90fd252520272421920c1f4017/src/FSharpx.Core/ComputationExpressions/Monad.fs#L806-809) Computation Expression.

Then it composes the handling of large messages in `handle` function using that Computation Expression, so we can avoid the nested pattern matching.

-----

As [FSharpx.Core](https://www.nuget.org/packages/FSharpx.Core/) has been included in source control, the entire diff is big – essentially there are 2 files to look at: *Program.fs* and *MailTests.fs*.