Next: , Previous: , Up: Associative Maps   [Contents][Index]


11.8.3 Amap accessors

procedure: amap-ref amap key [fail [succeed]]

Looks up the value associated to key in amap, invokes the procedure succeed on it, and returns its result; if succeed is not provided, then the value itself is returned. If key is not contained in amap and fail is supplied, then fail is invoked on no arguments and its result is returned. Otherwise an error is signaled.

procedure: amap-ref/default amap key default

Semantically equivalent to, but may be more efficient than, the following code:

(amap-ref amap key (lambda () default))
procedure: amap-comparator amap

Returns the comparator that was used to create amap.

procedure: amap-args amap

Returns the extra arguments that were used to create amap.

procedure: amap-implementation-name amap

Returns the name of amap’s backing implementation.