.net - Passing F# function to IEnumerable.Where vs IEnumerable.All -


Looking at the following:

  open system.link also N = N% 2 = 0 Let's Ceca = SEC {0..2..10}   

This is a valid expression:

  seqA.Where (even )   

but it is not:

  seqA.All (also)   

why also < / Code> but not for permission?

While there may be a bug, I think that would be a better approach IEnumerable & lt ; T & gt; Seq high command function should be used while working in F # instead of Linq in

  Even n = n% 2 = 0 let seqA = seq { 0..2..10} CKA & Gt; Seq.philter // Value: seq & lt; Int & gt; = CEC [0; 2; 4; 6; ...] seqA | & Gt; Seq.forall even // val it: bool = true    

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -