diff options
| author | Federico Igne <undyamon@disroot.org> | 2024-01-12 14:12:04 +0100 |
|---|---|---|
| committer | Federico Igne <undyamon@disroot.org> | 2024-01-12 14:12:04 +0100 |
| commit | 5b32d8115b7ea81dffc3fe48a0291569dba99e3b (patch) | |
| tree | 3e1e81229e2f5611015f59ffcc2878d1b85b27d8 /lib/zipper.mli | |
| parent | 0ac7c7839f4d8a3fe173177921e8d058c405da6d (diff) | |
| download | sandy-5b32d8115b7ea81dffc3fe48a0291569dba99e3b.tar.gz sandy-5b32d8115b7ea81dffc3fe48a0291569dba99e3b.zip | |
fear(zipper): add function to join two zippers
Diffstat (limited to 'lib/zipper.mli')
| -rw-r--r-- | lib/zipper.mli | 4 |
1 files changed, 4 insertions, 0 deletions
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 | |||
| 145 | (** [split z] splits the zipper in two. [([3; 2; 1], [4; 5])] becomes | 145 | (** [split z] splits the zipper in two. [([3; 2; 1], [4; 5])] becomes |
| 146 | [([3; 2; 1], []), ([], [4; 5])]. *) | 146 | [([3; 2; 1], []), ([], [4; 5])]. *) |
| 147 | 147 | ||
| 148 | val join : 'a zipper -> 'a zipper -> 'a zipper | ||
| 149 | (** [join z1 z2] creates a new zipper using [before z1] and [after z2]. | ||
| 150 | [([3; 2; 1], []) ([4; 2], [4; 5])] becomes [([3; 2; 1], [4; 5])]. *) | ||
| 151 | |||
| 148 | (** {1 Consuming zippers} *) | 152 | (** {1 Consuming zippers} *) |
| 149 | 153 | ||
| 150 | (** Since zippers are based on sequences, iterating over zippers | 154 | (** Since zippers are based on sequences, iterating over zippers |
