summaryrefslogtreecommitdiff
path: root/lib/zipper.mli
diff options
context:
space:
mode:
authorFederico Igne <undyamon@disroot.org>2024-01-12 14:12:57 +0100
committerFederico Igne <undyamon@disroot.org>2024-01-12 14:12:57 +0100
commitfd4fc4ce9ad45a25ca3e77a434306aa2476161bb (patch)
treeaccd4a498d1f1276c3d70d044a7eb18ba6848473 /lib/zipper.mli
parent5b32d8115b7ea81dffc3fe48a0291569dba99e3b (diff)
downloadsandy-fd4fc4ce9ad45a25ca3e77a434306aa2476161bb.tar.gz
sandy-fd4fc4ce9ad45a25ca3e77a434306aa2476161bb.zip
feat(zipper): add function to map on cursor focus with default
Diffstat (limited to 'lib/zipper.mli')
-rw-r--r--lib/zipper.mli4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/zipper.mli b/lib/zipper.mli
index beeb181..e25d57b 100644
--- a/lib/zipper.mli
+++ b/lib/zipper.mli
@@ -198,6 +198,10 @@ val map_after : ('a -> 'a) -> 'a zipper -> 'a zipper
198val map_focus : ('a -> 'a) -> 'a zipper -> 'a zipper 198val map_focus : ('a -> 'a) -> 'a zipper -> 'a zipper
199(** Map a function over the element focused by the cursor, if any. *) 199(** Map a function over the element focused by the cursor, if any. *)
200 200
201val map_focus_or : default:'a -> ('a -> 'a) -> 'a zipper -> 'a zipper
202(** Map a function over the element focused by the cursor. Push
203 [default] if no element is focused. *)
204
201val map : ('a -> 'a) -> 'a zipper -> 'a zipper 205val map : ('a -> 'a) -> 'a zipper -> 'a zipper
202(** Map a function over all elements of a zipper. *) 206(** Map a function over all elements of a zipper. *)
203 207