(declare a2)

(defn a1 [x]
  #(vector :a (a2 x) :e))

(defn a2 [x]
  (if (coll? x)
    #(apply vector (map a1 x))
    x))

(defn a [x]
  (trampoline a1 x))

(def b (a [[3 5] 1]))
(println b)


I'd like this program to print:
  [:a [[:a [[:a 3 :e] [:a 5 :e]] :e] [:a 1 :e]] :e].

Instead, it prints:
  [:a #<core$a2__2636$fn__2638 clojure.core
[EMAIL PROTECTED]> :e]

What must I change?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to