| title | Seq.tail<'T> Function (F#) |
|---|---|
| description | Seq.tail<'T> Function (F#) |
| keywords | visual f#, f#, functional programming |
| author | liboz |
| manager | danielfe |
| ms.date | 05/16/2016 |
| ms.topic | language-reference |
| ms.prod | visual-studio-dev14 |
| ms.technology | devlang-fsharp |
| ms.assetid | 1111ea81-e81d-4540-a7c0-465c892e8a23 |
Returns a new sequence by taking the input sequence without its first element.
Namespace/Module Path: Microsoft.FSharp.Collections.Seq
Assembly: FSharp.Core (in FSharp.Core.dll)
// Signature:
Seq.tail : seq<'T> -> seq<'T>
// Usage:
Seq.tail sourcesource Type: seq<'T>
The input sequence.
| Exception | Condition |
|---|---|
| ArgumentException | Thrown when the input sequence is empty. |
| ArgumentNullException | Thrown when the input sequence is null. |
A sequence consisting of the input sequence without its first element. It is the dual of Seq.head.
This function is named Tail in compiled assemblies. If you are accessing the function from a language other than F#, or through reflection, use this name.
The following code shows how to use Seq.tail.
[!code-fsharpMain]
Output
seq [2; 3; 4; 5; ...]
Error: The input sequence has an insufficient number of elements.
Parameter name: source
Windows 8, Windows 7, Windows Server 2012, Windows Server 2008 R2
F# Core Library Versions
Supported in: 4.0, Portable