delete-etTransitioning Sets and Tablesin-esetget-etGoTo Top

get-et   key et &optional default => value, present-p[Function]

Purpose
Return the value associated with key in et using eq as the key-comparison function.

Setf syntax

(setf (get-et   key et &optional default) value) => value

Package   :gbbopen-tools

Module   :gbbopen-tools

Arguments and values

key     An object
et     An ET
value     An object
present-p     A generalized boolean

Returns
Two values:

When setf is used with get-et, the supplied value is returned as a single value.

Description
Setf may be used with get-et to replace the value associated with the given key, or to add a new entry. When a get-et form is used as a setf place, any default which is supplied is evaluated, but its value is ignored.

See also
    make-et
    assq
    delete-et

Examples

  > (defparameter *e* (make-et))
  *et
  > (get-et 'x *et*)
  nil
  nil
  > (get-et 'x *et* ':missing)
  :missing
  nil
  > (setf (get-et 'x *et*) 1)
  1
  > (get-et 'x *et*)
  1
  t
  > (get-et nil *et*)
  nil
  nil
  > (setf (get-et nil *et*) nil)
  nil
  > (get-et nil *et*)
  nil
  t
  > 


The GBBopen Project


delete-etTransitioning Sets and Tablesin-esetget-etGoTo Top