summaryrefslogtreecommitdiff
path: root/lib/zipper.mli
diff options
context:
space:
mode:
Diffstat (limited to 'lib/zipper.mli')
-rw-r--r--lib/zipper.mli12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/zipper.mli b/lib/zipper.mli
index d79604e..0bbdf27 100644
--- a/lib/zipper.mli
+++ b/lib/zipper.mli
@@ -136,17 +136,29 @@ val push : 'a -> 'a zipper -> 'a zipper
136 Calling [push 0 z], if [z] is [([3; 2; 1], [4; 5])], 136 Calling [push 0 z], if [z] is [([3; 2; 1], [4; 5])],
137 the result is [([3; 2; 1], [0; 4; 5]))], *) 137 the result is [([3; 2; 1], [0; 4; 5]))], *)
138 138
139val push_seq : 'a Sequence.t -> 'a zipper -> 'a zipper
140(** Like {!Zipper.push}, but inserts a sequence of elements at the cursor
141 position. *)
142
139val push_after : 'a -> 'a zipper -> 'a zipper 143val push_after : 'a -> 'a zipper -> 'a zipper
140(** Insert an element after the cursor. Behaves like {!Zipper.push} if 144(** Insert an element after the cursor. Behaves like {!Zipper.push} if
141 the cursor is at the far right of the zipper. 145 the cursor is at the far right of the zipper.
142 Calling [push_after 0 z], if [z] is [([3; 2; 1], [4; 5])], 146 Calling [push_after 0 z], if [z] is [([3; 2; 1], [4; 5])],
143 the result is [([3; 2; 1], [4; 0; 5]))], *) 147 the result is [([3; 2; 1], [4; 0; 5]))], *)
144 148
149val push_after_seq : 'a Sequence.t -> 'a zipper -> 'a zipper
150(** Like {!Zipper.push_after}, but inserts a sequence of elements after
151 the cursor. *)
152
145val push_before : 'a -> 'a zipper -> 'a zipper 153val push_before : 'a -> 'a zipper -> 'a zipper
146(** Insert an element before the cursor. Return the modified zipper. 154(** Insert an element before the cursor. Return the modified zipper.
147 Calling [push_before 0 z], if [z] is [([3; 2; 1], [4; 5])], 155 Calling [push_before 0 z], if [z] is [([3; 2; 1], [4; 5])],
148 the result is [([0; 3; 2; 1], [4; 5]))]. *) 156 the result is [([0; 3; 2; 1], [4; 5]))]. *)
149 157
158val push_before_seq : 'a Sequence.t -> 'a zipper -> 'a zipper
159(** Like {!Zipper.push_before}, but inserts a sequence of elements
160 before the cursor. *)
161
150val split : 'a zipper -> 'a zipper * 'a zipper 162val split : 'a zipper -> 'a zipper * 'a zipper
151(** [split z] splits the zipper in two. [([3; 2; 1], [4; 5])] becomes 163(** [split z] splits the zipper in two. [([3; 2; 1], [4; 5])] becomes
152 [([3; 2; 1], []), ([], [4; 5])]. *) 164 [([3; 2; 1], []), ([], [4; 5])]. *)