Part 3 — A complete beginner’s guide to Computer Programming with Clojure: Introducing LEIN and REPL.

Photo by Markus Spiske on Unsplash

Lein

mkdir Projectcd Projectpwd
lein new app first_project
ls
cd first_project
Photo by Erico Marcelino on Unsplash
tree
cat src/first_project/core.clj
cat project.clj

REPL

lein repl
(println “Hello World”)Hello World
=> nil
(+ 5 10)=> 15 (+ 5)=> 5(+ 5 0)=> 5(println 5)5
=> nil

Java

Photo by Michael C on Unsplash
(import ‘(javax.swing JFrame))
(let [f (JFrame. “Hello World”)]    (doto f    (.setSize 400 200)    (.setVisible true)))
(import ‘(javax.swing JFrame JLabel))(let [f (JFrame. “Hello World”)label-text (JLabel. “ Hello World Again!”)](doto f(.add label-text)(.setSize 400 200)(.setVisible true)))

SUMMARY

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store