Not getting zips
Aug. 16th, 2017 09:50 pmI 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
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