Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a Functional Programming library for .NET?

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).

like image 465
EfForEffort Avatar asked Sep 17 '08 14:09

EfForEffort


People also ask

Is .NET functional programming?

NET—generics, LINQ, PLINQ, and Futures, for example—come from the application of functional programming concepts to languages that had never seen them before.

Is C# functional programming?

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.

Is VB Net functional programming?

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.

What is Monad in C#?

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.


2 Answers

LanguageExt looks very promising for making functional style programming in C# easier.

https://github.com/louthy/language-ext

like image 69
Trey Mack Avatar answered Oct 14 '22 13:10

Trey Mack


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.

like image 32
Gord Avatar answered Oct 14 '22 15:10

Gord