|
|
|
|
|
by jimbokun
6289 days 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. |
|