Skip to content
sellout edited this page Oct 7, 2012 · 1 revision

Available in finite maps, bind adds a new key-value pairing. bind! is the mutating version.

m = finite-map.empty;
lookup "foo" m;
⇒ error: not found
m2 = bind "foo" "bar" m;
lookup "foo" m2
⇒ "bar"
lookup "foo" m;
⇒ error: not found
bind! "foo" "baz" m;
lookup "foo" m;
⇒ "baz"

data structure performance