The most interesting thing I've learned from this release is just how
lenient old releases were in the face of erroneous code, of which I appear
to have had rather a lot. :)
That said, I have found at least one behavior I'm not able to understand.
This works perfectly with the new core.async:
(defn apply-prefix-to-txn [prefix in-txn]
(vec (for [op in-txn] (assoc op 1 (vec (concat prefix (get op 1)))))))
(defn apply-prefix
[in-chan prefix]
(map< (partial apply-prefix-to-txn prefix) in-chan))
...but the definition below (which is, certainly, much worse code) results
in a compile-time error:
(defn apply-prefix
[in-chan prefix]
(let [out-chan (chan)]
(go
(loop []
(when-let [in-txn (<! in-chan)]
(>! out-chan (vec (for [op in-txn] (assoc op 1 (vec (concat
prefix (get op 1)))))))
(recur))))))
...that being:
CompilerException java.lang.IllegalArgumentException: No method in
multimethod '-item-to-ssa' for dispatch value: :fn,
compiling:(/private/var/folders/hm/50_gxm6n4k3dbcqddkw3_btw0000gn/T/form-init2129308341681179922.clj:4:5)
My expectation is that these should be equivalent. Is there something I'm
missing here?
>
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.