API for fnmap
(master branch)
by
Stuart Sierra
Usage:
(ns your-namespace
(:require clojure.contrib.fnmap))
Overview
Maps that dispatch get/assoc to user-defined functions.
Note: requires AOT-compilation
Public Variables and Functions
fnmap
function
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.