MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

evaluation of a function via mathematica from clojure using the

  • To: mathgroup at smc.vnet.net
  • Subject: [mg112939] evaluation of a function via mathematica from clojure using the
  • From: Sunil S Nandihalli <sunil.nandihalli at gmail.com>
  • Date: Thu, 7 Oct 2010 03:35:22 -0400 (EDT)
  • References: <AANLkTikGcrJnbd0XjaSDddWqtEpAA6GhbicN21vwTRHz@mail.gmail.com>

Hello everybody,
I am trying to use clojure along with mathematica. I am not sure if this is
a completely mathematica question.. but I couldn't find a better place where
I could ask this question. Thanks to Clojuratica, the integration is
seamless..
 when I try to execute the following code
*(math (SetDelayed (func1 (Pattern x (Blank)))*
*        (With [f 10 g 20]*
*              (* f (+ g x)))))*
*(math (func1 30))*
I got
*(ClojurianScopes/With [f 10 g 20] (* f (+ 30 g)))*

and when I evaluated (the difference is I am using "Set" instead of
"SetDelayed")

*(math (Set (func2 (Pattern x (Blank)))*
*        (With [f 10 g 20]*
*              (* f (+ g x)))))*
*
*
*(math (func2 30))*


I got ...

*(ClojurianScopes/With [f 10 g 20] (* f (+ 30 g)))*

Adding N/Simplify did not make any difference..

I was expecting 500 in both of those tries..
 Can anybody help?
Sunil.


  • Prev by Date: Re: Function argument types
  • Next by Date: Re: change the base of the Log[] used by LogLogPlot?
  • Previous by thread: Re: A list based table join?
  • Next by thread: No extrapolation warning on Plot