Arguably it should be neither of these, but instead a macro of some
kind. The solution that would make it "impossible" to get this wrong
would be something like:

(defmacro primitives [& specs]
  `(list
    ~@(for [s specs]
       (if (coll? s)
         `(list '~(first s) ~(second s))
         `(list '~s ~s)))))

user=> (primitives + - (disp print))
((+ #<core$_PLUS_ clojure.core$_PLUS_@145ad3d>) (- #<core$_
clojure.core$_@517bc3>) (disp #<core$print clojure.core
$print@166de66>))


On Jan 23, 9:09 pm, David <dsieg...@yahoo.com> wrote:
> Line 86 of core.clj is:
>
>         (list 'cadr caddr)
>
> and should be:
>
>         (list 'caddr caddr)
>
> On Jan 23, 9:45 pm, dennis <killme2...@gmail.com> wrote:
>
> > I have implemented a simple interpreter in clojure,it is just
> > transformed from the interpreter in SICP.Maybe someone interested in
> > it.
>
> > I have pushed it on github athttps://github.com/killme2008/cscheme
> > ,you can clone and run it by yourself.
>
>

-- 
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