Clojure code comments
If we would like to comment out a line of the code we simply use a semicolon at the beginning. To comment out a block of the code we use hash underscore #_ (reader macro).…
Let’s talk about namespaces today. Below is a structure of the core.clj file that is located in /src/app/ directory. Function ns sets the namespace.…
Bindings in Clojure
In Clojure we can bind a piece of the code/data to a var (variable). To declare a global var we use a def special form (similar to let keyword in JS world).…
Functions in Clojure
Functions in Clojure are data structures since the language follows code as a data structure principle (homoiconicity).
In Clojure those data structures are lists since it is a dialect of the LISP (LISt Processor) language, the second oldest language still in use today.…
Mutable data structure can be changed after creation immutable cannot.
Paradoxically, when you need to mutate a data structure, is a time then you should use an immutable data structure because it allows a structured mutation.…