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

Photo by Markus Spiske on Unsplash


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


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


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)))


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