October 2016
Intermediate to advanced
618 pages
10h 44m
English
In this recipe, we will integrate Clojure and Scala. We will configure a mixing project using Leiningen.
We create a project by lein new clojure-scala and project.clj as follows:
(defproject clojure-scala "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]
[org.scala-lang/scala-library "2.11.7"]]
:plugins [[io.tomw/lein-scalac "0.1.2"]]
:scala-source-path "src/scala"
:scala-version "2.11.7"
:prep-tasks ["scalac"]
:main clojure-scala.core
)
After modifying the project.clj, start the REPL.
We will explain how Clojure code calls ...
Read now
Unlock full access