Learning Clojure: Day 1
I learnt how to bind names to values using def
. I also went through an article which talked about how binding is very different from assignment. He takes a very interesting approach in explaining the concept using Python, Clojure, and Go. Clojure supports only binding and there is no assignment.
If you like to change the value of the name then you will need to do multiple bindings. I am still not fully aware of the advantage we have with binding and not assigning. I will soon find the answer to it. If you can do multiple bindings then does it mean these variables are mutable ?
Source:
Chapter 3 : Do Things: A Clojure Crash Course