next up previous contents
Next: Sol Category definitions Up: Macros Previous: function and synchronized-function

operator and synchronized-operator

The operator macro creates a function with three implicit arguments: A set and an element of that set. Additional arguments may be specified in the ordinary way. It returns zero or more new elemenents contained in a new set.

(defmacro operator (args . body)
`(function sset
((this-set sset)
this-element
(this-index integer) ,@args) ,@body))

The synchronized-operator is the operator macro counterpart to the synchronized-function. Right now just make it an alias for operator.

(defmacro synchronized-operator (args . body)
`(synchronized-function sset
((this-set sset)
this-element
(this-index integer) ,@args) ,@body))

The operator macro creates a function with three implicit arguments: A set and an element of that set. Additional arguments may be specified in the ordinary way. It returns zero or more new elemenents contained in a new set.

(defmacro operator (type args . body) (if (in? sset type) `(function sset ((this-set sset) this-element (this-index integer) ,@args) ,@body) (error "operator: Must return a set." (list in? sset ,type) '-> '#f)))



Richard W. DeVaul
1998-12-07