This project is read-only.
skipWhile - simple

Category:
LINQ
Description: This sample uses SkipWhile to get the elements of the array starting from the first element divisible by 3.
Code:
let LINQ18() =
let numbers = [ 5; 4; 1; 3; 9; 8; 6; 7; 2; 0 ]

query {
for n in numbers do
skipWhile (n % 3 <> 0)
} |> Seq.iter(fun n -> printfn "%A" n)

//sample output
// 3
// 9
// 8
// 6
// 7
// 2
// 0



Execution Result:
3
9
8
6
7
2
0

Last edited Sep 14, 2011 at 2:46 AM by ttliu2000, version 1

Comments

No comments yet.