.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

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -