previous up next     contents index
Next: Classes and Objects Up: Structures Previous: Structures

Utilities

Structure values can only be created and updated with the constructor and setter procedures created by define-struct, but structure values are not opaque. These utility functions work on with all structure values:

The  struct-type? predicate returns #t if its argument is a structure type value or #f otherwise.

The  struct-setter-procedure? predicate returns #t if its argument is a setter procedure generated by define-struct or #f otherwise.

Two structure values are  eqv? if and only if they are  eq?. Two structure values are  equal? if they have the same structure type and their corresponding fields are all equal?.



PLT