Hey there,

>
Congratulations on getting this far. It took me a long time too to be able 
to do something this complicated. I think it's cool that you're thinking 
about this kind of problem. This is essentially a small recursive 
interpreter, which is a neat problem.

How do you drop the first element from a list?

(def ls '(+ 1 2))

(first ls) => '+

(rest ls) => '(1 2)

http://clojuredocs.org/clojure.core/rest

So your function would become:

(defn evaltree [tree]
  (cons (eval tree) (rest tree)))

I hope that helps.

Rock on!
Eric

-- 
Eric Normand
Chief Instigator, LispCast: http://lispcast.com

Learn Clojure: http://purelyfunctional.tv
Clojure Gazette: http://clojuregazette.com
Twitter: https://twitter.com/ericnormand

LispCast
2659 Iberville St
New Orleans, LA 70119

504-302-3742


-- 
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
--- 
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 clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to