Skip to content

⛓ Functional .NET standard library with an declarative approach for common tasks.

License

Notifications You must be signed in to change notification settings

inputfalken/Lemonad

Repository files navigation

Logo by area55git is licensed under CC 4.0 International License.

Build status NuGet

Summary

A functional C# library with data structures and functions whose main goal is to have an declarative approach to problem solving by using various HOF's to achieve cleaner code bases & code which is easier to think about.

Data structures

IResult<out T, TError>

One value will always be present. Either it's the value to the left (T) or the value to the right (TError). The value to the Left is considered successfull and the right value is considered to be a failure.

There's also an asynchronous version of IResult<out T, TError> available called IAsyncResult<T out, TError>

For more information about how to use IResult<out T, TError, visit this article about railway oriented programming.

IMaybe<out T>

Works like IResult<T, TError> but there's no TError available. So you might have a value (T) present.

There's also an asynchronous version of IMaybe<out T> available called IAsyncMaybe<T out>

Examples

Check the samples