HashIdentity.FromFunctions<'T> 函数 (F#)

使用给定哈希和相等性函数进行哈希处理。

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

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

// Signature:
FromFunctions : ('T -> int) -> ('T -> 'T -> bool) -> IEqualityComparer<'T>

// Usage:
FromFunctions hasher equality

参数

  • hasher
    类型:'T -> int

    用于从值生成哈希代码的函数。

  • equality
    类型:'T -> 'T -> bool

    测试两个值是否相等的函数。

返回值

一个使用提供的函数实现 IEqualityComparer 的对象。

平台

Windows 7、Windows Vista SP2、Windows XP SP3、Windows XP x64 SP2、Windows Server 2008 R2、Windows Server 2008 SP2、Windows Server 2003 SP2

版本信息

F# 运行时

受以下版本支持:2.0、4.0

Silverlight

受以下版本支持:3

请参见

参考

Collections.HashIdentity 模块 (F#)

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