Hi everybody, The following is a http://pastebin.com/0r9BBdmK
code which is using clojuratica. I am trying to write a function .. But when evaluated it is not behaving as expected. The function definition is (defn irreducibleQ [x] (With [f 10 g 20] (* f (+ g x)))) The output expected out of (irreducibleQ 30) was 500 but instead I got (ClojurianScopes/With [f 10 g 20] (* f (+ g x))) can anybody tell me as to what is happening here... I am not able to find any examples in the clojuratica examples which describe how I would create a function. Can anybody help me figure out what is going wrong here? Thanks Sunil. *BY CLOJURATICA FUNCTION DEFI... ON THE 25TH OF SEP 2010 05:29:13 AM* DOWNLOAD <http://pastebin.com/download.php?i=0r9BBdmK> | RAW<http://pastebin.com/raw.php?i=0r9BBdmK> | EMBED <http://pastebin.com/embed.php?i=0r9BBdmK> | REPORT<http://pastebin.com/report.php?i=0r9BBdmK> | DELETE <http://pastebin.com/delete.php?i=0r9BBdmK> 1. (ns clojuratica-exp.core 2. (:use clojuratica) 3. (:require [clojure.contrib.str-utils2 :as str]) 4. (:import [com.wolfram.jlink MathLinkFactory])) 5. 6. (defn init-mathematica 7. "initialize mathematica" 8. [mathematica-command] 9. (defonce math-evaluate (math-evaluator 10. (doto (MathLinkFactory/createKernelLink mathematica-command) 11. (.discardAnswer))))) 12. 13. (init-mathematica "-linkmode launch -linkname '/usr/local/Wolfram/Mathematica/7.0/Executables/math'") 14. 15. (def-math-macro math math-evaluate) 16. (math-intern math-evaluate "System`*") 17. (math-intern math-evaluate :scopes) 18. 19. (D (Plus (* 4 x) (+ 20 2) (nfunc 3)) x) 20. (defn irreducibleQ [x] 21. (With [f 10 g 20] 22. (* f (+ g x)))) 23. (irreducibleQ 30) -- 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