This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /usr/local/bin | |
sudo wget https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein | |
ls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo chmod +x lein | |
ls | |
./lein |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lein -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lein repl | |
"Hello Clojure!" | |
quit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"clojureVSCode.formatOnSave": true, | |
"clojureVSCode.autoStartNRepl": false, | |
"clojure.toolsJar": "/home/chinnonsantos/.lein/self-installs/leiningen-2.9.1-standalone.jar", | |
"clojure.leinPath": "/usr/local/bin/lein" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn greetings [name] | |
(str "Hello " name "!")) | |
(greetings "Clojure") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java --version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt update | |
sudo apt install openjdk-13-jre-headless |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun fizzbuzz(start: Int, end: Int): Unit { | |
for (k in start..end) { | |
if (k % 3 == 0 && k % 5 == 0) | |
println("Fizz Buzz") | |
else if (k % 3 == 0) | |
println("Fizz") | |
else if (k % 5 == 0) | |
println("Buzz") | |
else | |
println(k) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun fizzbuzz(start: Int, end: Int): Unit { | |
fun isFizz(k: Int): Boolean = k % 3 == 0 | |
fun isBuzz(k: Int): Boolean = k % 5 == 0 | |
for (k in start..end) { | |
if (isFizz(k) && isBuzz(k)) | |
println("Fizz Buzz") | |
else if (isFizz(k)) | |
println("Fizz") | |
else if (isBuzz(k)) |
OlderNewer