From fe1660852491a2726a6cfaaa39e1be730e312b4c Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Wed, 21 Feb 2018 10:21:36 -0600 Subject: [PATCH] add `CCHash.combine{5,6}` --- src/core/CCHash.ml | 6 ++++++ src/core/CCHash.mli | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/src/core/CCHash.ml b/src/core/CCHash.ml index 8b0b9ac7..3958da4f 100644 --- a/src/core/CCHash.ml +++ b/src/core/CCHash.ml @@ -21,6 +21,12 @@ let combine3 a b c = let combine4 a b c d = combine2 (combine2 a b) (combine2 c d) +let combine5 a b c d e = + combine2 (combine2 a b) (combine2 (combine2 c d) e) + +let combine6 a b c d e f = + combine2 (combine2 a b) (combine2 (combine2 c d) (combine2 e f)) + (** {2 Combinators} *) let const h _ = h diff --git a/src/core/CCHash.mli b/src/core/CCHash.mli index 1a687ead..fe86eac8 100644 --- a/src/core/CCHash.mli +++ b/src/core/CCHash.mli @@ -64,6 +64,12 @@ val combine2 : hash -> hash -> hash val combine3 : hash -> hash -> hash -> hash val combine4 : hash -> hash -> hash -> hash -> hash +val combine5 : hash -> hash -> hash -> hash -> hash -> hash +(** @since NEXT_RELEASE *) + +val combine6 : hash -> hash -> hash -> hash -> hash -> hash -> hash +(** @since NEXT_RELEASE *) + (** {2 Iterators} *) type 'a sequence = ('a -> unit) -> unit