API for fnmap - clojure-contrib v1.2 (stable)

by Stuart Sierra

clojure-contrib is now deprecated

clojure-contrib is no longer being developed or maintained.

Rather than a single, monolithic, contributions library, Clojure now has a set of separate libraries for each unit of functionality. The libraries are in the Clojure GitHub organization at https://github.com/clojure. API documentation of the libraries can be found at https://clojure.github.io.

If you're looking for a specific function or namespace from the old clojure-contrib, see "Where Did Clojure.Contrib Go".

Full namespace name: clojure.contrib.fnmap


Maps that dispatch get/assoc to user-defined functions.

Note: requires AOT-compilation

Public Variables and Functions


This library, clojure-contrib, is deprecated. See here for more information.
Usage: (fnmap getter setter)
       (fnmap getter setter & keyvals)
Creates a fnmap, or functional map.  A fnmap behaves like an
ordinary Clojure map, except that calls to get and assoc are
filtered through user-defined getter and setter functions, which
operate on an internal map.

(getter m key) should return a value for key.

(setter m key value) should assoc key with value and return a new
map for m.

All other map operations are passed through to the internal map.
Logo & site design by Tom Hickey.
Clojure auto-documentation system by Tom Faulhaber.