From 3534b2f4ed4ee682d2c09aa501e77338c0e166f7 Mon Sep 17 00:00:00 2001 From: Marc Coquand Date: Mon, 13 May 2024 11:10:51 -0500 Subject: Initial commit x2 --- lib/zipper.ml | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 lib/zipper.ml (limited to 'lib') diff --git a/lib/zipper.ml b/lib/zipper.ml deleted file mode 100644 index 37e14de..0000000 --- a/lib/zipper.ml +++ /dev/null @@ -1,22 +0,0 @@ -type zipper = - { above : string list - ; selected : string - ; below : string list - } - -let up (zipper : zipper) = - match zipper.above with - | [] -> zipper - | a :: rest -> { above = rest; selected = a; below = zipper.selected :: zipper.below } - - -let down (zipper : zipper) = - match zipper.below with - | [] -> zipper - | a :: rest -> { below = rest; selected = a; above = zipper.selected :: zipper.above } - - -let selected zipper = zipper.selected - -let to_array zipper = - List.concat [ zipper.above; [ zipper.selected ]; zipper.below ] |> Array.of_list -- cgit v1.2.3