.net - F# List.map equivalent in C#? -


Is the list of F # .map function in C #? That is, apply a function for each element in the list and return a new list containing the result.

Something like this:

  Public stable IEnumerable & lt; TResult & gt; Maps & lt; TSource, TResult & gt; (This IEnumerable & lt; TSource & gt; source, function & lt; TSource, TResult & gt; Farka) {foreach (TSource element in source) yield returns rewarding. Invoke (element); }  

Is it already built in a way or should I write custom extensions?

this will be the of LINQ - that is

 < Code> var newSequence = originalSequence.Select (x = & gt; {translation}); Choose the solution in x from  

or

  var newSequence = original {translation};  

Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

Which Python client library should I use for CouchdB? -