On this page:
eq-get
eq-put!
eq-label!
eq-rem!
eq-plist
eq-adjoin!
eq-delete!
eq-clone!

2.1 eq-properties🔗

 (require sicm/general/eq-properties) package: rktsicm

This module provides methods for anotating objects. It manages a master record where objects are linked (weakly) to some properties. One of the ways this is used is in the solver to annotate that an abstract-number is expected to be real, or positive etc...

Objects that are eq? will share the same properties. Property keys are tested with eq?

procedure

(eq-get obj key)  any/c

  obj : any/c
  key : any/c
Retrieve the property key from object obj.

procedure

(eq-put! obj key val)  obj

  obj : any/c
  key : any/c
  val : any/c
Sets property key for object obj to value val.

procedure

(eq-label! obj key val ... ...)  obj

  obj : any/c
  key : any/c
  val : any/c
Sets property key, value val pairs for object obj.

procedure

(eq-rem! obj key ...)  obj

  obj : any/c
  key : any/c
Removes properties key from object obj.

procedure

(eq-plist obj)  (listof (cons/c any/c any/c))

  obj : any?
Retrieve the properties from obj as an association list.

procedure

(eq-adjoin! obj key val)  obj

  obj : any/c
  key : any/c
  val : any/c
For property key of object obj where the property points to a set, add value val to this set. If property key is not yet defined, create it.

procedure

(eq-delete! obj key val)  obj

  obj : any/c
  key : any/c
  val : any/c
For property key of object obj where the property points to a set, remove value val from this set.

procedure

(eq-clone! source target)  target

  source : any/c
  target : any/c
Copy all properties defined on source to target, removing any previously defined properties of target.