On Nov 14, 8:08 pm, gun43 <bg-561...@versanet.de> wrote: > Using r1366 under Win XP. r1366? From Subversion? That's ancient. Clojure moved to git ages ago; see http://github.com/richhickey/clojure
> > A user defined function: > 1:27 user=> (defn plus2 [x] (+ x 2)) > #'user/plus2 > 1:28 user=> (plus2 5) > 7 > > can only be eval'd > 1:29 user=> (list plus2 5) > (#<user$plus2__217 user$plus2__...@4d76b4> 5) > 1:30 user=> (eval (list plus2 5)) > java.lang.ExceptionInInitializerError (repl-1:30) > > when passed with #' > 1:31 user=> (list #'plus2 5) > (#'user/plus2 5) > 1:32 user=> (eval (list #'plus2 5)) > 7 > > in contrast to a core function > 1:33 user=> (inc 5) > 6 > > which works without > 1:34 user=> (list inc 5) > (#<core$inc__3416 clojure.core$inc__3...@ded0f0> 5) > 1:35 user=> (eval (list inc 5)) > 6 > > and with #'. > 1:36 user=> (list #'inc 5) > (#'clojure.core/inc 5) > 1:37 user=> (eval (list #'inc 5)) > 6 > > This is a real problem for anonymous functions. > 1:38 user=> (#(+ % 2) 5) > 7 > 1:54 user=> (list #(+ % 2) 5) > (#<user$eval__277$fn__279 user$eval__277$fn__...@1f99eea> 5) > 1:55 user=> (eval (list #(+ % 2) 5)) > java.lang.ExceptionInInitializerError (repl-1:55) > > Is this a bug or am I doing something wrong. > This stuff all worked under r1338. I had no idea that this worked at all. Usually eval evaluates lists of symbols and other primitives, eg. (eval (list 'user2 2 3)). Hm. Anyway, try upgrading your Clojure. :) -- Jarkko -- 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