News for hackers. Stuff that matters.
Re:Usefulness of inventing programming languages by jkkramer on Tuesday April 26, 2011 @12:18PM (#2485906)
In Clojure, hash maps are functions of their keys. If you use keywords as keys, then keywords are also functions of maps.

    ({:a 1} :a)
    => 1

    (:a {:a 1})
    => 1

    (map {2 4} [1 2 3])
    => (nil 4 nil)

    (map {:a 1 :b 2 :c 3} [:a :b :c])
    => (1 2 3)
Re:Usefulness of inventing programming languages by emilis_info on Tuesday April 26, 2011 @01:51PM (#2486356)
Thank you! One more reason to use Clojure...