simplest way to add a type to a map in clojure

Viewed 103

I'm searching for the lightest way to add a type to a clojure map I know i could use records for doing that but i'm wondering if i can do it with regular maps

i've got a function to create a map that represent a person:

(defn person [first-name last-name] {:first-name first-name :last-name last-name})

i would like to be able to do something like that:

(def wayne (person "Wayne" "Shorter"))
....
(type wayne) 
=> person  
1 Answers
Related