Liking cljdoc? Tell your friends :D

rewrite-clj.zip.removez


removecljs

(remove zloc)

Remove value at the given zipper location. Returns the first non-whitespace node that would have preceded it in a depth-first walk. Will remove whitespace appropriately.

  • [1 2 3] => [1 3]
  • [1 2] => [1]
  • [1 2] => [2]
  • [1] => []
  • [ 1 ] => []
  • [1 [2 3] 4] => [1 [2 3]]
  • [1 [2 3] 4] => [[2 3] 4]

If a node is located rightmost, both preceding and trailing spaces are removed, otherwise only trailing spaces are touched. This means that a following element (no matter whether on the same line or not) will end up in the same position (line/column) as the removed one, unless a comment lies between the original node and the neighbour.

Remove value at the given zipper location. Returns the first non-whitespace
 node that would have preceded it in a depth-first walk. Will remove whitespace
 appropriately.

- `[1  2  3]   => [1  3]`
- `[1 2]       => [1]`
- `[1 2]       => [2]`
- `[1]         => []`
- `[  1  ]     => []`
- `[1 [2 3] 4] => [1 [2 3]]`
- `[1 [2 3] 4] => [[2 3] 4]`

 If a node is located rightmost, both preceding and trailing spaces are removed,
 otherwise only trailing spaces are touched. This means that a following element
 (no matter whether on the same line or not) will end up in the same position
 (line/column) as the removed one, _unless_ a comment lies between the original
 node and the neighbour.
sourceraw docstring

remove-preserve-newlinecljs

(remove-preserve-newline zloc)

Same as remove but preserves newlines

Same as remove but preserves newlines
sourceraw docstring

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

× close