[CLJ-941] NullPointerException possible with seq-zip Created: 26/Feb/12 Updated: 19/Jun/17
|Affects Version/s:||Release 1.3|
Possibly the make-node function for seq-zip should be:
(fn [node children] (with-meta (or children ()) (meta node)))
|Comment by Greg Chapman [ 26/Feb/12 5:54 PM ]|
Also the docstring for zipper should probably be updated to indicate that the children parameter can be nil.
|Comment by Christopher Brown [ 19/Jun/17 8:43 PM ]|
4+ years later, I also ran into this.
Is there a workaround? I.e., is there a way to remove elements from singleton branches?
|Comment by Alex Miller [ 19/Jun/17 9:35 PM ]|
Would be happy to see a patch (although it also needs to backfill some tests too).
One workaround would be something like:
Or you could use another zipper library like hara.zip which doesn't have remove, but works with delete-right: