lux/data/struct/zipper

Types

Zipper

Tree zippers, for easy navigation and editing over trees.

(type: (Zipper a)
  {#parent (lux;Maybe (Zipper a))
   #lefts (lux/data/struct/stack;Stack (lux/data/struct/tree;Tree a))
   #rights (lux/data/struct/stack;Stack (lux/data/struct/tree;Tree a))
   #node (lux/data/struct/tree;Tree a)})

Values

(append-child value zipper)

(All [a] (-> a (Zipper a) (Zipper a)))

(branch? zipper)

(All [a] (-> (Zipper a) lux;Bool))

(children zipper)

(All [a] (-> (Zipper a) (lux;List (lux/data/struct/tree;Tree a))))

(down zipper)

(All [a] (-> (Zipper a) (Zipper a)))

(end? zipper)

(All [a] (-> (Zipper a) lux;Bool))

(from-tree tree)

(All [a] (-> (lux/data/struct/tree;Tree a) (Zipper a)))

(insert-left value zipper)

(All [a] (-> a (Zipper a) (lux;Maybe (Zipper a))))

(insert-right value zipper)

(All [a] (-> a (Zipper a) (lux;Maybe (Zipper a))))

(leaf? zipper)

(All [a] (-> (Zipper a) lux;Bool))

(left zipper)

(All [a] (-> (Zipper a) (Zipper a)))

(leftmost zipper)

(All [a] (-> (Zipper a) (Zipper a)))

(next zipper)

(All [a] (-> (Zipper a) (Zipper a)))

(parent zipper)

(All [a] (-> (Zipper a) (lux;Maybe (Zipper a))))

(prepend-child value zipper)

(All [a] (-> a (Zipper a) (Zipper a)))

(prev zipper)

(All [a] (-> (Zipper a) (Zipper a)))

(remove zipper)

(All [a] (-> (Zipper a) (lux;Maybe (Zipper a))))

(right zipper)

(All [a] (-> (Zipper a) (Zipper a)))

(rightmost zipper)

(All [a] (-> (Zipper a) (Zipper a)))

(root zipper)

(All [a] (-> (Zipper a) (Zipper a)))

(root? zipper)

(All [a] (-> (Zipper a) lux;Bool))

(set value zipper)

(All [a] (-> a (Zipper a) (Zipper a)))

(to-tree zipper)

(All [a] (-> (Zipper a) (lux/data/struct/tree;Tree a)))

(up zipper)

(All [a] (-> (Zipper a) (Zipper a)))

(update f zipper)

(All [a] (-> (-> a a) (Zipper a) (Zipper a)))

(value zipper)

(All [a] (-> (Zipper a) a))