2 ms·
Clojure: user> (def h {:foo "hi"}) #'user/h user> (h :foo) "hi" user> (h :bar) nil The main difference with the Ruby is the immutable
by jimbokun 18y ago
Clojure:
user> (def h {:foo "hi"})
#'user/h
user> (h :foo)
"hi"
user> (h :bar)
nil
The main difference with the Ruby is the immutable by default data structure, which is why I replaced the assignment with a literal definition of the map. In any case, I think this demonstrates how Clojure has stolen some of the good ideas from Ruby and Python in addition to stealing many of the best ideas from other Lisps.
- mattjones 18y agoThat is a great demonstration that Scheme's problems are not Lisp problems. I'm hoping that we're about to see a lot more experimentation with new Lisp dialects.