Changes for clojure.core/hash-map

AtKaaZ on Wed, 27 Feb 2013
;; create hash map the long way
user=> (hash-map)
{}

;; create hash map the short way
user=> {}
{}

;; sending a key more times, will remap it to the last value
user=> (hash-map :key1 1, :key1 2) 
{:key1 2} 

user=> {:key1 1, :key1 2}
IllegalArgumentException Duplicate key: :key1  clojure.lang.PersistentArrayMap.createWithCheck (PersistentArrayMap.java:70)


user=> (hash-map :key1 'val1, 'key2 :val2, [:compound :key] nil)
{[:compound :key] nil, :key1 val1, key2 :val2} 

rafmagana on Thu, 21 Jun 2012
;; create hash map the long way
user=> (hash-map)
{}

;; create hash map the short way
user=> {}
{}

;; sending a key more times, will remap it to the last value
user=> (hash-map :key1 1, :key1 2) 
{:key1 2} 

user=> (hash-map :key1 'val1, 'key2 :val2, [:compound :key] nil)
{[:compound :key] nil, :key1 val1, key2 :val2} 

belun on Tue, 28 Sep 2010
user=> (hash-map)
{} 

;; sending a key more times, will remap it to the last value
user=> (hash-map :key1 1, :key1 2) 
{:key1 2} 

user=> (hash-map :key1 'val1, 'key2 :val2, [:compound :key] nil)
{[:compound :key] nil, :key1 val1, key2 :val2} 

zmila on Wed, 28 Jul 2010
user=> (hash-map)
{} 

user=> (hash-map :key1 1, :key1 2) 
{:key1 2} 

user=> (hash-map :key1 'val1, 'key2 :val2, [:compound :key] nil)
{[:compound :key] nil, :key1 val1, key2 :val2}