2017-08-16

izard: (Default)
2017-08-16 09:50 pm

Not getting zips

I am not getting clojure zip, that is so sad. Here is a trivial function:

REPL> (def atree (list 1 2 3 (list 4 5) (list 6)))
REPL> (rm-from-tree atree 10)
(1 2 3 (4 5) (6))
REPL> (rm-from-tree atree 3)
(1 2 (4 5) (6))
REPL> (rm-from-tree atree 5)
(1 2 3 (4) (6))
So far, so good.
Now:
REPL> (rm-from-tree atree 6)
NullPointerException clojure.core/with-meta--4375 (core.clj:218)

WTF??

Upd: works fine if I replace list with vector.. WTF??!!1111