Liking cljdoc? Tell your friends :D

hara.core.zip


+base+clj


at-end?clj

(at-end? {:keys [context] :as zip})

replace element right of the current status

(->> (from-status '[1 [[|]]]) (at-end?)) => true

(->> (from-status '[1 [[[2 |]] 3]]) (at-end?)) => false

replace element right of the current status

(->> (from-status '[1 [[|]]])
     (at-end?))
=> true

(->> (from-status '[1 [[[2 |]] 3]])
     (at-end?))
=> false
raw docstring

at-inside-most-left?clj

(at-inside-most-left? zip)

check if at inside-most left point of a container

(-> (from-status '[1 2 [ | 1 2]]) (at-inside-most-left?)) => true

check if at inside-most left point of a container

(-> (from-status '[1 2 [ | 1 2]])
    (at-inside-most-left?))
=> true
raw docstring

at-inside-most?clj

(at-inside-most? zip)

check if at inside-most point of a container

(-> (from-status '[1 2 [3 4 |]]) (at-inside-most?)) => true

check if at inside-most point of a container

(-> (from-status '[1 2 [3 4 |]])
    (at-inside-most?))
=> true
raw docstring

at-left-most?clj

(at-left-most? zip)

check if at left-most point of a container

(-> (from-status [1 2 ['| 3 4]]) (at-left-most?)) => true

check if at left-most point of a container

(-> (from-status [1 2 ['| 3 4]])
    (at-left-most?))
=> true
raw docstring

at-outside-most?clj

(at-outside-most? zip)

check if at outside-most point of the tree

(-> (from-status [1 2 [3 4 '|]]) (at-outside-most?)) => false

(-> (from-status '[1 2 [3 4 |]]) (step-outside) (step-outside) (at-outside-most?)) => true

check if at outside-most point of the tree

(-> (from-status [1 2 [3 4 '|]])
    (at-outside-most?))
=> false

(-> (from-status '[1 2 [3 4 |]])
    (step-outside)
    (step-outside)
    (at-outside-most?))
=> true
raw docstring

at-right-most?clj

(at-right-most? zip)

check if at right-most point of a container

(-> (from-status '[1 2 [3 4 |]]) (at-right-most?)) => true

check if at right-most point of a container

(-> (from-status '[1 2 [3 4 |]])
    (at-right-most?))
=> true
raw docstring

can-step-inside-left?clj

(can-step-inside-left? {:keys [context] :as zip})

check if can step left inside a container

(-> (from-status '[[3 4] |]) (can-step-inside-left?)) => true

check if can step left inside a container

(-> (from-status '[[3 4] |])
    (can-step-inside-left?))
=> true
raw docstring

can-step-inside?clj

(can-step-inside? {:keys [context] :as zip})

check if can step down from current status

(-> (from-status '[1 2 [3 4 |]]) (can-step-inside?)) => false

(-> (from-status '[1 2 | [3 4]]) (can-step-inside?)) => true

check if can step down from current status

(-> (from-status '[1 2 [3 4 |]])
    (can-step-inside?))
=> false

(-> (from-status '[1 2 | [3 4]])
    (can-step-inside?))
=> true
raw docstring

can-step-left?clj

(can-step-left? {:keys [context] :as zip})

check if can step left from current status

(-> (from-status '[1 2 [3 | 4]]) (can-step-left?)) => true

(-> (from-status '[1 2 [| 3 4]]) (can-step-left?)) => false

check if can step left from current status

(-> (from-status '[1 2 [3 | 4]])
    (can-step-left?))
=> true

(-> (from-status '[1 2 [| 3 4]])
    (can-step-left?))
=> false
raw docstring

can-step-outside?clj

(can-step-outside? {:keys [context] :as zip})

check if can step up from current status

(-> (from-status '[1 2 [3 4 |]]) (can-step-outside?)) => true

check if can step up from current status

(-> (from-status '[1 2 [3 4 |]])
    (can-step-outside?))
=> true
raw docstring

can-step-right?clj

(can-step-right? {:keys [context] :as zip})

check if can step right from current status

(-> (from-status '[1 2 [3 | 4]]) (can-step-right?)) => true

(-> (from-status '[1 2 [3 4 |]]) (can-step-right?)) => false

check if can step right from current status

(-> (from-status '[1 2 [3 | 4]])
    (can-step-right?))
=> true

(-> (from-status '[1 2 [3 4 |]])
    (can-step-right?))
=> false
raw docstring

check-contextclj

(check-context context)

checks that the zipper contains valid functions

(check-context {}) => (throws)

checks that the zipper contains valid functions

(check-context {})
=> (throws)
raw docstring

check-optionalclj

(check-optional context)

checks that the meta contains valid functions

(check-optional {}) => (throws)

checks that the meta contains valid functions

(check-optional {})
=> (throws)
raw docstring

current-elementsclj

(current-elements {:keys [left right] :as zip})

all elements left and right of current position

(-> (from-status '[1 2 | 3 4]) (current-elements)) => '(1 2 3 4)

(-> (from-status '[1 [2 | 3] 4]) (current-elements)) => '(2 3)

all elements left and right of current position

(-> (from-status '[1 2 | 3 4])
    (current-elements))
=> '(1 2 3 4)

(-> (from-status '[1 [2 | 3] 4])
    (current-elements))
=> '(2 3)
raw docstring

delete-leftclj

(delete-left {:keys [context left] :as zip})
(delete-left {:keys [context] :as zip} n)

delete element/s left of the current status

(-> (from-status '[1 2 | 3]) (delete-left) (status)) => '([1 | 3])

delete element/s left of the current status

(-> (from-status '[1 2 | 3])
    (delete-left)
    (status))
=> '([1 | 3])
raw docstring

delete-rightclj

(delete-right {:keys [context right] :as zip})
(delete-right {:keys [context] :as zip} n)

delete element/s right of the current status

(-> (from-status '[1 2 | 3]) (delete-right) (status)) => '([1 2 |])

delete element/s right of the current status

(-> (from-status '[1 2 | 3])
    (delete-right)
    (status))
=> '([1 2 |])
raw docstring

findclj

(find zip move pred)

helper function for the rest of the find series

helper function for the rest of the `find` series
raw docstring

find-leftclj

(find-left zip pred)

steps status left to search predicate

(-> (from-status '[0 1 [2 3] [4 5] 6 |]) (find-left odd?) (status)) => '([0 | 1 [2 3] [4 5] 6])

(-> (from-status '[0 1 [2 3] [4 5] 6 |]) (find-left keyword?)) => nil

steps status left to search predicate

(-> (from-status '[0 1 [2 3] [4 5] 6 |])
    (find-left odd?)
    (status))
=> '([0 | 1 [2 3] [4 5] 6])

(-> (from-status '[0 1 [2 3] [4 5] 6 |])
    (find-left keyword?))
=> nil
raw docstring

find-nextclj

(find-next zip pred)

step status through the tree in depth first order to the first matching element

(-> (vector-zip [1 [2 [6 7] 3] [4 5]]) (find-next #(= 7 %)) (status)) => '([1 [2 [6 | 7] 3] [4 5]])

(-> (vector-zip [1 [2 [6 7] 3] [4 5]]) (find-next keyword)) => nil

step status through the tree in depth first order to the first matching element

(-> (vector-zip [1 [2 [6 7] 3] [4 5]])
    (find-next #(= 7 %))
    (status))
=> '([1 [2 [6 | 7] 3] [4 5]])

(-> (vector-zip [1 [2 [6 7] 3] [4 5]])
    (find-next keyword))
=> nil
raw docstring

find-prevclj

(find-prev zip pred)

step status through the tree in reverse order to the last matching element

(-> (from-status '[1 [2 [6 | 7] 3] [4 5]]) (find-prev even?) (status)) => '([1 [2 [| 6 7] 3] [4 5]])

step status through the tree in reverse order to the last matching element

(-> (from-status '[1 [2 [6 | 7] 3] [4 5]])
    (find-prev even?)
    (status))
=> '([1 [2 [| 6 7] 3] [4 5]])
raw docstring

find-rightclj

(find-right zip pred)

steps status right to search for predicate

(-> (from-status '[0 | 1 [2 3] [4 5] 6]) (find-right even?) (status)) => '([0 1 [2 3] [4 5] | 6])

steps status right to search for predicate

(-> (from-status '[0 | 1 [2 3] [4 5] 6])
    (find-right even?)
    (status))
=> '([0 1 [2 3] [4 5] | 6])
raw docstring

from-statusclj

(from-status data)
(from-status data zipper-fn)

returns a zipper given a data structure with | as the status

(from-status '[1 2 3 | 4]) => (contains {:left '(3 2 1), :right '(4)})

returns a zipper given a data structure with | as the status

(from-status '[1 2 3 | 4])
=> (contains {:left '(3 2 1),
              :right '(4)})
raw docstring

getclj

(get zip)
(get zip arg)
(get zip func step)

gets the value of the zipper

(-> (vector-zip [0 1 2 3 4]) (step-inside) (get)) => 0

gets the value of the zipper

(-> (vector-zip [0 1 2 3 4])
    (step-inside)
    (get))
=> 0
raw docstring

hierarchyclj

(hierarchy {:keys [context] :as zip})

replace element right of the current status

(->> (from-status '[1 [[|]]]) (hierarchy) (map right-element)) => [[] [[]] [1 [[]]]]

replace element right of the current status

(->> (from-status '[1 [[|]]])
     (hierarchy)
     (map right-element))
=> [[] [[]] [1 [[]]]]
raw docstring

insert-leftclj

(insert-left {:keys [context] :as zip} data)
(insert-left {:keys [context] :as zip} data & more)

insert element/s left of the current status

(-> (from-status '[1 2 [[| 3] 4]]) (insert-left 1 2 3) (status)) => '([1 2 [[1 2 3 | 3] 4]])

insert element/s left of the current status

(-> (from-status '[1 2  [[| 3] 4]])
    (insert-left 1 2 3)
    (status))
=> '([1 2 [[1 2 3 | 3] 4]])
raw docstring

insert-rightclj

(insert-right {:keys [context] :as zip} data)
(insert-right {:keys [context] :as zip} data & more)

insert element/s right of the current status

(-> (from-status '[| 1 2 3]) (insert-right 1 2 3) (status)) => '([| 3 2 1 1 2 3])

insert element/s right of the current status

(-> (from-status '[| 1 2 3])
    (insert-right 1 2 3)
    (status))
=> '([| 3 2 1 1 2 3])
raw docstring

isclj

(is zip pred)
(is zip pred step)

checks zip given a predicate

(-> (vector-zip [0 1 2 3 4]) (step-inside) (is zero?)) => true

checks zip given a predicate

(-> (vector-zip [0 1 2 3 4])
    (step-inside)
    (is zero?))
=> true
raw docstring

is-container?clj

(is-container? zip)
(is-container? {:keys [context] :as zip} step)

checks if node on either side is a container

(-> (vector-zip [1 2 3]) (is-container? :right)) => true

(-> (vector-zip [1 2 3]) (is-container? :left)) => false

checks if node on either side is a container

(-> (vector-zip [1 2 3])
    (is-container? :right))
=> true

(-> (vector-zip [1 2 3])
    (is-container? :left))
=> false
raw docstring

is-empty-container?clj

(is-empty-container? zip)
(is-empty-container? {:keys [context] :as zip} step)

check if current container is empty

(-> (vector-zip []) (is-empty-container?)) => true

check if current container is empty

(-> (vector-zip [])
    (is-empty-container?))
=> true
raw docstring

left-elementclj

(left-element zip)

element directly left of current position

(-> (vector-zip [1 2 3 4]) (step-inside))

(-> (from-status '[1 2 3 | 4]) (left-element)) => 3

element directly left of current position

(-> (vector-zip [1 2 3 4])
    (step-inside))


(-> (from-status '[1 2 3 | 4])
    (left-element))
=> 3
raw docstring

left-elementsclj

(left-elements zip)

all elements left of current position

(-> (from-status '[1 2 | 3 4]) (left-elements)) => '(1 2)

all elements left of current position

(-> (from-status '[1 2 | 3 4])
    (left-elements))
=> '(1 2)
raw docstring

levelwalkclj

(levelwalk zip [pred] f)
(levelwalk zip [pred] f levelwalk {:keys [move-right can-move-right?] :as opts})

performs a match at the same level

(-> (vector-zip [1 2 3 4]) (step-inside) (levelwalk [(fn [zip] (odd? (right-element zip)))] delete-right) (root-element)) => [2 4]

performs a match at the same level

(-> (vector-zip [1 2 3 4])
    (step-inside)
    (levelwalk [(fn [zip]
                  (odd? (right-element zip)))]
               delete-right)
    (root-element))
=> [2 4]
raw docstring

list-child-elementsclj

(list-child-elements zip)
(list-child-elements {:keys [context] :as zip} direction)

lists elements of a container

(-> (vector-zip [1 2 3]) (list-child-elements :right)) => '(1 2 3)

(-> (vector-zip 1) (list-child-elements :right)) => (throws)

lists elements of a container 

(-> (vector-zip [1 2 3])
    (list-child-elements :right))
=> '(1 2 3)

(-> (vector-zip 1)
    (list-child-elements :right))
=> (throws)
raw docstring

matchwalkclj

(matchwalk zip matchers f)
(matchwalk zip
           [pred & more :as matchers]
           f
           matchwalk
           {:keys [move-right can-move-right?] :as opts})

performs a match at each level

(-> (matchwalk (vector-zip [1 [2 [3 [4]]]]) [(fn [zip] (= 2 (first (right-element zip)))) (fn [zip] (= 4 (first (right-element zip))))] delete-left) (root-element)) => [1 [2 [[4]]]]

performs a match at each level

(-> (matchwalk (vector-zip [1 [2 [3 [4]]]])
               [(fn [zip]
                  (= 2 (first (right-element zip))))
                (fn [zip]
                  (= 4 (first (right-element zip))))]
               delete-left)
    (root-element))
=> [1 [2 [[4]]]]
raw docstring

postwalkclj

(postwalk zip f)

emulates clojure.walk/postwalk behavior with zipper

(-> (vector-zip [[1 2] [3 4]]) (postwalk (fn [v] (if (vector? v) (conj v 100) (+ v 100)))) (root-element)) => [[101 102 100] [103 104 100] 100]

emulates clojure.walk/postwalk behavior with zipper

(-> (vector-zip [[1 2] [3 4]])
    (postwalk (fn [v] (if (vector? v)
                        (conj v 100)
                        (+ v 100))))
    (root-element))
=> [[101 102 100] [103 104 100] 100]
raw docstring

prewalkclj

(prewalk {:keys [context] :as zip} f)

emulates clojure.walk/prewalk behavior with zipper

(-> (vector-zip [[1 2] [3 4]]) (prewalk (fn [v] (if (vector? v) (conj v 100) (+ v 100)))) (root-element)) => [[101 102 200] [103 104 200] 200]

emulates clojure.walk/prewalk behavior with zipper

(-> (vector-zip [[1 2] [3 4]])
    (prewalk (fn [v] (if (vector? v)
                       (conj v 100)
                       (+ v 100))))
    (root-element))
=> [[101 102 200] [103 104 200] 200]
raw docstring

replace-leftclj

(replace-left zip data)

replace element left of the current status

(-> (from-status '[1 2 | 3]) (replace-left "10") (status)) => '([1 "10" | 3])

replace element left of the current status

(-> (from-status '[1 2 | 3])
    (replace-left "10")
    (status))
=> '([1 "10" | 3])
raw docstring

replace-rightclj

(replace-right zip data)

replace element right of the current status

(-> (from-status '[1 2 | 3]) (replace-right "10") (status)) => '([1 2 | "10"])

replace element right of the current status

(-> (from-status '[1 2 | 3])
    (replace-right "10")
    (status))
=> '([1 2 | "10"])
raw docstring

right-elementclj

(right-element zip)

element directly right of current position

(-> (from-status '[1 2 3 | 4]) (right-element)) => 4

element directly right of current position

(-> (from-status '[1 2 3 | 4])
    (right-element))
=> 4
raw docstring

right-elementsclj

(right-elements zip)

all elements right of current position

(-> (from-status '[1 2 | 3 4]) (right-elements)) => '(3 4)

all elements right of current position

(-> (from-status '[1 2 | 3 4])
    (right-elements))
=> '(3 4)
raw docstring

root-elementclj

(root-element zip)

accesses the top level node

(-> (vector-zip [[[3] 2] 1]) (step-inside-most) (root-element)) => [[[3] 2] 1]

accesses the top level node

(-> (vector-zip [[[3] 2] 1])
    (step-inside-most)
    (root-element))
=> [[[3] 2] 1]
raw docstring

seq-zipclj

(seq-zip root)
(seq-zip root opts)

constructs a sequence zipper

(seq-zip '(1 2 3 4 5)) => (contains {:left (), :right '((1 2 3 4 5))})

constructs a sequence zipper

(seq-zip '(1 2 3 4 5))
=> (contains {:left (),
              :right '((1 2 3 4 5))})
raw docstring

statusclj

(status {:keys [context] :as zip})

returns the form with the status showing

(-> (vector-zip [1 [[2] 3]]) (step-inside) (step-right) (step-inside) (step-inside) (status)) => '([1 [[| 2] 3]])

returns the form with the status showing

(-> (vector-zip [1 [[2] 3]])
    (step-inside)
    (step-right)
    (step-inside)
    (step-inside)
    (status))
=> '([1 [[| 2] 3]])
raw docstring

status-stringclj

(status-string zip)

returns the string form of the status

(-> (vector-zip [1 [[2] 3]]) (step-inside) (step-right) (status-string)) => "[1 | [[2] 3]]"

returns the string form of the status

(-> (vector-zip [1 [[2] 3]])
    (step-inside)
    (step-right)
    (status-string))
=> "[1 | [[2] 3]]"
raw docstring

step-endclj

(step-end {:keys [context] :as zip})

steps status to container directly at end

(->> (from-status '[1 | [[]]]) (step-end) (status)) => '([1 [[|]]])

steps status to container directly at end

(->> (from-status '[1 | [[]]])
     (step-end)
     (status))
=> '([1 [[|]]])
raw docstring

step-insideclj

(step-inside {:keys [context] :as zip})
(step-inside zip n)

step down from current status

(-> (from-status '[1 2 | [3 4]]) (step-inside) (status)) => '([1 2 [| 3 4]])

step down from current status

(-> (from-status '[1 2 | [3 4]])
    (step-inside)
    (status))
=> '([1 2 [| 3 4]])
raw docstring

step-inside-leftclj

(step-inside-left {:keys [context] :as zip})
(step-inside-left zip n)

steps into the form on the left side

(-> (from-status '[[1 2] |]) (step-inside-left) (status)) => '([[1 2 |]])

steps into the form on the left side

(-> (from-status '[[1 2] |])
    (step-inside-left)
    (status))
=> '([[1 2 |]])
raw docstring

step-inside-mostclj

(step-inside-most {:keys [context] :as zip})

step to at-inside-most point of current container

(-> (from-status '[1 2 | [[3] 4]]) (step-inside-most) (status)) => '([1 2 [[| 3] 4]])

step to at-inside-most point of current container

(-> (from-status '[1 2 | [[3] 4]])
    (step-inside-most)
    (status))
=> '([1 2 [[| 3] 4]])
raw docstring

step-inside-most-leftclj

(step-inside-most-left {:keys [context] :as zip})

steps all the way inside to the left side

(-> (from-status '[[1 [2]] | 3 4]) (step-inside-most-left) (status)) => '([[1 [2 |]] 3 4])

steps all the way inside to the left side

(-> (from-status '[[1 [2]] | 3 4])
    (step-inside-most-left)
    (status))
=> '([[1 [2 |]] 3 4])
raw docstring

step-leftclj

(step-left {:keys [left context right] :as zip})
(step-left zip n)

step left from current status

(-> (from-status '[1 2 [3 4 |]]) (step-left) (status)) => '([1 2 [3 | 4]])

step left from current status

(-> (from-status '[1 2 [3 4 |]])
    (step-left)
    (status))
=> '([1 2 [3 | 4]])
raw docstring

step-left-mostclj

(step-left-most {:keys [context] :as zip})

step to left-most point of current container

(-> (from-status '[1 2 [3 4 |]]) (step-left-most) (status)) => '([1 2 [| 3 4]])

step to left-most point of current container

(-> (from-status '[1 2 [3 4 |]])
    (step-left-most)
    (status))
=> '([1 2 [| 3 4]])
raw docstring

step-nextclj

(step-next {:keys [context] :as zip})

step status through the tree in depth first order

(->> (from-status '[| 1 [2 [6 7] 3] [4 5]]) (iterate step-next) (take-while identity) (map right-element)) => '(1 [2 [6 7] 3] 2 [6 7] 6 7 3 [4 5] 4 5)

step status through the tree in depth first order

(->> (from-status '[| 1 [2 [6 7] 3] [4 5]])
     (iterate step-next)
     (take-while identity)
     (map right-element))
=> '(1 [2 [6 7] 3] 2 [6 7] 6 7 3 [4 5] 4 5)
raw docstring

step-outsideclj

(step-outside zip)
(step-outside zip n)

step out to the current container

(-> (from-status '[1 2 [| 3 4]]) (step-outside) (status)) => '([1 2 | [3 4]])

step out to the current container

(-> (from-status '[1 2 [| 3 4]])
    (step-outside)
    (status))
=> '([1 2 | [3 4]])
raw docstring

step-outside-mostclj

(step-outside-most {:keys [context] :as zip})

step to outside-most point of the tree

(-> (from-status '[1 2 [| 3 4]]) (step-outside-most) (status)) => '(| [1 2 [3 4]])

step to outside-most point of the tree

(-> (from-status '[1 2 [| 3 4]])
    (step-outside-most)
    (status))
=> '(| [1 2 [3 4]])
raw docstring

step-outside-most-rightclj

(step-outside-most-right {:keys [context] :as zip})

step to outside-most point of the tree to the right

(-> (from-status '[1 2 [| 3 4]]) (step-outside-most-right) (status)) => '([1 2 [3 4]] |)

step to outside-most point of the tree to the right

(-> (from-status '[1 2 [| 3 4]])
    (step-outside-most-right)
    (status))
=> '([1 2 [3 4]] |)
raw docstring

step-outside-rightclj

(step-outside-right zip)
(step-outside-right zip n)

the right of the current container

(-> (from-status '[1 2 [| 3 4]]) (step-outside-right) (status)) => '([1 2 [3 4] |])

the right of the current container

(-> (from-status '[1 2 [| 3 4]])
    (step-outside-right)
    (status))
=> '([1 2 [3 4] |])
raw docstring

step-prevclj

(step-prev {:keys [context] :as zip})

step status in reverse through the tree in depth first order

(->> (from-status '[1 [2 [6 7] 3] [4 | 5]]) (iterate step-prev) (take 10) (map right-element)) => '(5 4 [4 5] 3 7 6 [6 7] 2 [2 [6 7] 3] 1)

step status in reverse through the tree in depth first order

(->> (from-status '[1 [2 [6 7] 3] [4 | 5]])
     (iterate step-prev)
     (take 10)
     (map right-element))
=> '(5 4 [4 5] 3 7 6 [6 7] 2 [2 [6 7] 3] 1)
raw docstring

step-rightclj

(step-right {:keys [left right context] :as zip})
(step-right zip n)

step right from current status

(-> (from-status '[1 2 [| 3 4]]) (step-right) (status)) => '([1 2 [3 | 4]])

step right from current status

(-> (from-status '[1 2 [| 3 4]])
    (step-right)
    (status))
=> '([1 2 [3 | 4]])
raw docstring

step-right-mostclj

(step-right-most {:keys [context] :as zip})

step to right-most point of current container

(-> (from-status '[1 2 [| 3 4]]) (step-right-most) (status)) => '([1 2 [3 4 |]])

step to right-most point of current container

(-> (from-status '[1 2 [| 3 4]])
    (step-right-most)
    (status))
=> '([1 2 [3 4 |]])
raw docstring

surroundclj

(surround {:keys [context parent left] :as zip})

nests elements in current block within another container

(-> (vector-zip 3) (insert-left 1 2) (surround) (status)) => '(| [1 2 3])

(->> (from-status '[1 [1 2 | 3 4]]) (surround) (status)) => '([1 [| [1 2 3 4]]])

nests elements in current block within another container

(-> (vector-zip 3)
    (insert-left 1 2)
    (surround)
    (status))
=> '(| [1 2 3])

(->> (from-status '[1 [1 2 | 3 4]])
     (surround)
     (status))
=> '([1 [| [1 2 3 4]]])
raw docstring

update-child-elementsclj

(update-child-elements zip child-elements)
(update-child-elements {:keys [context] :as zip} child-elements direction)

updates elements of a container

(-> (vector-zip [1 2]) (update-child-elements [1 2 3 4] :right) (right-element)) => [1 2 3 4]

updates elements of a container

(-> (vector-zip [1 2])
    (update-child-elements [1 2 3 4] :right)
    (right-element))
=> [1 2 3 4]
raw docstring

vector-zipclj

(vector-zip root)
(vector-zip root opts)

constructs a vector based zipper

(vector-zip [1 2 3 4 5]) => (contains {:left (), :right '([1 2 3 4 5])})

constructs a vector based zipper

(vector-zip [1 2 3 4 5])
=> (contains {:left (),
              :right '([1 2 3 4 5])})
raw docstring

zipperclj

(zipper root context)
(zipper root context opts)

constructs a zipper

constructs a zipper
raw docstring

zipper?clj

(zipper? x)

checks to see if an object is a zipper

(zipper? 1) => false

checks to see if an object is a zipper

(zipper? 1)
=> false
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close