For example, in Java there is Functional Java and Higher-Order Java. Both essentially give a small API for manipulating higher-order, curried functions, and perhaps a few new data types (tuples, immutable lists).
NET—generics, LINQ, PLINQ, and Futures, for example—come from the application of functional programming concepts to languages that had never seen them before.
C# has the some functional language features, closures, for example. The . NET libraries aren't written in a functional style, so in practice C# isn't a functional language.
Microsoft C#/VB.NET supports functional programming With the introduction of LINQ and Lambda expressions, functional programming came into existence. For example, consider the LINQ statement below: SomeCollection.
In C# terms, a Monad is a generic class with two operations: constructor and bind. class Monad<T> { Monad(T instance); Monad<U> Bind(Func<T, Monad<U>> f); } Constructor is used to put an object into container, Bind is used to replace one contained object with another contained object.
LanguageExt looks very promising for making functional style programming in C# easier.
https://github.com/louthy/language-ext
have you looked into F#?
Also a neat blog post would be here that talks about how to use the new generic / lambda expressions built into c# 3.0.
If you just add using System.Linq to the top of your source file there are a LOT of nice new functions added to working with collections such as folding / filtering / etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With