Map (higher-order function): Difference between revisions

Content deleted Content added
No edit summary
.NET languages are no longer considered strictly "procedural;" Select came out with C# 3.0 and VB 9, and in .NET, "functions" are referred to as "methods"
Line 30:
* <code>fmap (f . g) = fmap f . fmap g -- composition</code>
 
==Mapping in .NET procedural languages==
The map function in .NET procedural languages likesuch C# or VB.NET (as of C# 2.0 and VB 8.0{{Fact|date=June 2008}}) NET is supported through the <code>Select</code> extension method. Here's an example that combines the use of selectSelect() with the use of [[anonymous functionsmethods]], support for which was added to C# in version 3.0 (November 2007).
 
<source lang="csharp">
var valuesintArray = new System.Collections.Generic.List<int>()[] { 7, 13, 4, 9, 3 };
var foosquaredInts = valuesintArray.Select(di => di * di);
</source>