This project is read-only.
Concat - Simple

Category:
LINQ
Description: This sample uses Concat to create one sequence that contains each array's values, one after the other.
Code:
let LINQ38() =
let numbersA = [0; 2; 4; 5; 6; 8; 9 ]
let numbersB = [ 1; 3; 5; 7; 8 ]

numbersA.Concat(numbersB)|>Seq.iter(fun n -> printfn "%A" n)


//sample output
// 0
// 2
// 4
// 5
// 6
// 8
// 9
// 1
// 3
// 5
// 7
// 8



Execution Result:
0
2
4
5
6
8
9
1
3
5
7
8

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

Comments

No comments yet.