Table of contents
TOC
Collapse the table of content
Expand the table of content

Array.concat<'T> Function (F#)

Den Delimarsky|Last Updated: 6/8/2016
|
2 Contributors

Builds a new array that contains the elements of each of the given sequence of arrays.

Namespace/Module Path: Microsoft.FSharp.Collections.Array

Assembly: FSharp.Core (in FSharp.Core.dll)

Syntax

// Signature:
Array.concat : seq<'T []> -> 'T []

// Usage:
Array.concat arrays

Parameters

arrays Type: seq<'T[]>

The input sequence of arrays.

Return Value

The concatenation of the sequence of input arrays.

Remarks

This function is named Concat in compiled assemblies. If you are accessing the function from a language other than F#, or through reflection, use this name.

Example

The following example demonstrates the use of Array.concat.


Array.concat [ [|0..3|] ; [|4|] ]
//output [|0; 1; 2; 3; 4|]

Array.concat [| [|0..3|] ; [|4|] |]
//output [|0; 1; 2; 3; 4|]

Output:

[|0; 1; 2; 3; 4|]

Platforms

Windows 8, Windows 7, Windows Server 2012, Windows Server 2008 R2

Version Information

F# Core Library Versions

Supported in: 2.0, 4.0, Portable

See Also

Collections.Array Module (F#)

Microsoft.FSharp.Collections Namespace (F#)

© 2016 Microsoft