Hi There!

I'm Dan Schlegel, an Associate Professor in the Computer Science Department at SUNY Oswego

Clojure Substitute Functions

Lookup

Note that (get m i i) can be abbreviated (m i i) since Clojure allows maps to be in function position in order to perform lookups.

Usage example:

Substitute

Usage example:

Note: There is a shortcut syntax for building lambda (anonymous) functions. Instead of (fn [i] ...) write #( ... ). If the anonymous function is of only one variable it is called %. If you have more than one they are %1, %2, … So this could be rewritten:

Deep Substitute

Usage example: