API for map-utils (master branch)

by Jason Wolfe, Chris Houser

Usage:
(ns your-namespace
  (:require clojure.contrib.map-utils))

Overview

Utilities for operating on Clojure maps.

Public Variables and Functions



deep-merge-with

function
Usage: (deep-merge-with f & maps)
Like merge-with, but merges maps recursively, applying the given fn
only when there's a non-map at a particular level.

(deepmerge + {:a {:b {:c 1 :d {:x 1 :y 2}} :e 3} :f 4}
             {:a {:b {:c 2 :d {:z 9} :z 3} :e 100}})
-> {:a {:b {:z 3, :c 3, :d {:z 9, :x 1, :y 2}}, :e 103}, :f 4}


lazy-get

macro
Usage: (lazy-get map key not-found)
Like get, but doesn't evaluate not-found unless it is needed.


safe-get

function
Usage: (safe-get map key)
Like get, but throws an exception if the key is not found.


safe-get-in

function
Usage: (safe-get-in map ks)
Like get-in, but throws an exception if any key is not found.
Logo & site design by Tom Hickey.
Clojure auto-documentation system by Tom Faulhaber.