-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Clojure Data Analysis Cookbook - Second Edition - Second Edition
By :
We can use Mathematica to create functions that we can pass around and call from Clojure, similar to other functions. Moreover, we can also call these functions from within Mathematica and pass them around in Mathematica. As far as each environment is concerned, functions from the other environment are just black boxes that can be called, but even that much is still very useful.
We must first have Clojuratica and Mathematica talking to each other. Either complete the Setting up Mathematica to talk to Clojuratica for Mac OS X and Linux recipe or the Setting up Mathematica to talk to Clojuratica for Windows recipe. Also, we need to call the init-mma function beforehand.
Also, we must make sure that the Clojuratica namespace is imported into our script or REPL:
(use 'clojuratica)
Here, we'll create a function that simply wraps the FactorInteger Mathematica function:
(def factor-int
(math
(Function [x] (FactorInteger x))))We can...
Change the font size
Change margin width
Change background colour