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.…
A value mutability
Mutating a value. When you receive a data structure that is in its identity mutable, like an array or object, the best thing to do is to always assume that it is a read-only data structure and that you are not allowed to mutate it.…