From 5b32d8115b7ea81dffc3fe48a0291569dba99e3b Mon Sep 17 00:00:00 2001 From: Federico Igne Date: Fri, 12 Jan 2024 14:12:04 +0100 Subject: fear(zipper): add function to join two zippers --- lib/zipper.mli | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/zipper.mli') diff --git a/lib/zipper.mli b/lib/zipper.mli index c3c79a6..beeb181 100644 --- a/lib/zipper.mli +++ b/lib/zipper.mli @@ -145,6 +145,10 @@ val split : 'a zipper -> 'a zipper * 'a zipper (** [split z] splits the zipper in two. [([3; 2; 1], [4; 5])] becomes [([3; 2; 1], []), ([], [4; 5])]. *) +val join : 'a zipper -> 'a zipper -> 'a zipper +(** [join z1 z2] creates a new zipper using [before z1] and [after z2]. + [([3; 2; 1], []) ([4; 2], [4; 5])] becomes [([3; 2; 1], [4; 5])]. *) + (** {1 Consuming zippers} *) (** Since zippers are based on sequences, iterating over zippers -- cgit v1.2.3