Learning Clojure: Day 0
Published in
1 min readNov 21, 2017
I have been learning Clojure for about two weeks now. I decided to publish a small snippet of what I learn daily in Clojure. This way it can help me know whether I’m making progress each day. More importantly, this is one way of teaching and by that I can help beginner programmers plus it serves as a good revision :)
Yesterday I learn’t few keywords like do
, when
, or
, and
.
do
operator is helpful when you want to write multiple forms in anif
block.when
operator is helpful when you only want to write logic forif
block and not care about anything when it is false.or
operator returns either the first truthy value or the last value.and
returns the first falsey value or, if no values are falsey, the last truthy value.
Source: Chapter 3 Do Things: A Clojure Crash Course from the book : Clojure for the Brave and True.