From 9068cbc1ccc5b728d531e2e6030332535aa46592 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Tue, 10 Nov 2020 18:06:30 -0500 Subject: [PATCH] fix tests and build --- src/core/CCList.ml | 16 ++++++++-------- src/core/CCListLabels.mli | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/core/CCList.ml b/src/core/CCList.ml index d68c2a06..72122ac1 100644 --- a/src/core/CCList.ml +++ b/src/core/CCList.ml @@ -586,14 +586,14 @@ let combine_shortest l1 l2 = direct direct_depth_default_ l1 l2 (*$T - (combine_chop [] []) = [] - (combine_chop [1] []) = [] - (combine_chop [] [1]) = [] - (combine_chop (1--1025) (1--1026)) = List.combine (1--1025) (1--1025) - (combine_chop (1--1026) (1--1025)) = List.combine (1--1025) (1--1025) - combine_chop [1;2;3] [3;2;1] = List.combine [1;2;3] [3;2;1] - combine_chop (1 -- 100_000) (1 -- 100_000) = List.combine (1 -- 100_000) (1 -- 100_000) - combine_chop (1 -- 100_001) (1 -- 100_000) = List.combine (1 -- 100_000) (1 -- 100_000) + (combine_shortest [] []) = [] + (combine_shortest [1] []) = [] + (combine_shortest [] [1]) = [] + (combine_shortest (1--1025) (1--1026)) = List.combine (1--1025) (1--1025) + (combine_shortest (1--1026) (1--1025)) = List.combine (1--1025) (1--1025) + combine_shortest [1;2;3] [3;2;1] = List.combine [1;2;3] [3;2;1] + combine_shortest (1 -- 100_000) (1 -- 100_000) = List.combine (1 -- 100_000) (1 -- 100_000) + combine_shortest (1 -- 100_001) (1 -- 100_000) = List.combine (1 -- 100_000) (1 -- 100_000) *) diff --git a/src/core/CCListLabels.mli b/src/core/CCListLabels.mli index e5176fa0..a07581c4 100644 --- a/src/core/CCListLabels.mli +++ b/src/core/CCListLabels.mli @@ -142,9 +142,9 @@ val combine_gen : 'a list -> 'b list -> ('a * 'b) gen @since 1.2, but only @since 2.2 with labels *) -val combine_chop : 'a list -> 'b list -> ('a * 'b) list -(** [combine [a1; …; am] [b1; …; bn]] is [[(a1,b1); …; (am,bm)]] if m <= n. - Like {!combine} but stops at the shortest list rather than raising. +val combine_shortest : 'a list -> 'b list -> ('a * 'b) list +(** [combine_shortest [a1; …; am] [b1; …; bn]] is [[(a1,b1); …; (am,bm)]] if m <= n. + Like {!combine} but stops at the shortest list rather than raising. @since 3.1 *) val split : ('a * 'b) t -> 'a t * 'b t