Why does the F # s Collections.Seq module basically override all Enumerable extension methods?

Why Collections.Seqdoes the module have many methods that seem to be equivalent to the extension methods declared in ? Why did the F # designers feel the need to create a new namespace and new / different names for all of these, instead of reusing what already exists in .NET? System.Linq.Enumerable

(If they need additional methods, why didn't they just add them to System.Linq.Enumerable?)

+3
source share
3 answers

Some other decent answers here, but my answer is brief

  • ( .NET , F #)
  • ( .NET , F # let-bound )

, F #, , API- .NET F #. F # ( ) - ( ).

, F # , F #. ( - blog.)

+7

LINQ System.Core = > .NET 3.5 , F # .NET 2.0 +.

Seq ( ) F #, LINQ Enumerable extensions.

+7

(| > , < |, → ) F #.

.NET Extension Methods . F # pipelining oprators partial . Seq .

#

seq.Where(...)
   .Select(...)
   .Take(...)

F #

seq
|> Seq.filter ...
|> Seq.map ...
|> Seq.take ...
+6

Source: https://habr.com/ru/post/1766197/


All Articles