Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. # map-invert Inverts the maps so that the values become the keys and vice versa. ### Syntax <code> (map-invert hmap) </code> ### Example <code> (ns clojure.examples.example (:require [clojure.set :as set]) (:gen-class)) (defn example [] (def demokeys (hash-map "z" 1 "b" 2 "a" 3)) (def demonew (set/map-invert demokeys)) (println demonew)) (example) </code> #### Output <code> {1 z, 3 a, 2 b} </code> ## Refs - https://www.tutorialspoint.com/clojure/clojure_mapinvert.htm open/map-invert.txt Last modified: 2024/10/05 06:15by 127.0.0.1