I seem to have nasty problem with clojure I/O (or typesystem). The point is that this function, which I expect to consume collection of collections of strings and numbers or strings, and returns dictionary of strings associated with numbers, like
(costlist '( '("Milk" 4) '("Bread" 2) '("Milk")))
giving
{"Milk" 4, "Bread" 2 }
Defined by
(defn costlist [lst]
;returns list of costs and appropriate names
(let [snds (filter (fn [x] (not (identical? nil x))) (seconds lst))]
(zipmap
(firsts (take (count snds) (firsts lst)))
(snds lst))))
when consuming lists of type clojure.lang.PersistentList (which I converted from clojure.lang.LazySeq) throws error message
clojure.lang.LazySeq cannot be cast to clojure.lang.IFn
Which only confuses me, as any of its arguments don't seem to be LazySeq to me.