List.Cons<'T> 方法 (F#)

返回一个列表,head 作为其第一个元素,tail 作为其后续元素。

命名空间/模块路径:Microsoft.FSharp.Collections

程序集:FSharp.Core(在 FSharp.Core.dll 中)

// Signature:
static member List.Cons : 'T * 'T list -> 'T list

// Usage:
List.Cons (head, tail)

参数

  • head
    类型:'T

    列表的新头部值。

  • tail
    类型:'T list

    现有的列表。

返回值

包含 head 追加到 tail 头部的列表。

平台

Windows 8,Windows 7,Windows server 2012中,Windows server 2008 R2

版本信息

F#核心库版本

支持:2.0,4.0,可移植

请参见

参考

Collections.List<'T> 联合 (F#)

Microsoft.FSharp.Collections 命名空间 (F#)