Back
remove (clj)
(source)function
(remove loc)
Removes the node at loc, returning the loc that would have preceded
it in a depth-first walk.
Examples
clojure
(ns clojure.test-clojure.clojure-zip
(:use clojure.test)
(:require [clojure.zip :as zip]))
; zipper
;
; seq-zip
; vector-zip
; xml-zip
;
; node
; branch?
; children
; make-node
; path
; lefts
; rights
; down
; up
; root
; right
; rightmost
; left
; leftmost
;
; insert-left
; insert-right
; replace
; edit
; insert-child
; append-child
; next
; prev
; end?
; remove
marick/fp-oo
(require '[clojure.zip :as zip])
(= (zip/node zipper) '/)
(-> zipper
zip/right
zip/remove
zip/right
zip/remove
(zip/insert-right (-> zipper zip/right zip/node))
(zip/insert-right (-> zipper zip/right zip/right zip/node))
zip/next
helper)