I'm working on the chapter on continuations in On Lisp (Chapter 20)
and am trying to translate the code to clojure
However, I am running into some issues.

With the following definitions:

(def *cont* identity)
(defmacro =values [& retvals]
  `(*cont* ~...@retvals))


why would the following two expressions throw errors???
(binding [*cont* (fn [m n] (=values (list m n)))] (*cont* 'a 'b))
(binding [*cont* (fn [m n] (=values (list m n)))] (=values 'hello
'there))

However, these two expression work without a problem!
((binding [*cont* (fn [m n] (=values (list m n)))] *cont*) 'a 'b)
(binding [*cont* (fn [m n] (list m n))] (*cont* 'a 'b))






-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to