diff options
Diffstat (limited to 'weeb/struct.scm')
| -rw-r--r-- | weeb/struct.scm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/weeb/struct.scm b/weeb/struct.scm index 1f14d94..fbf90c3 100644 --- a/weeb/struct.scm +++ b/weeb/struct.scm @@ -41,9 +41,10 @@ instantiate the record's fields." (apply (record-constructor type) args)) -(define (instance-of? type rtd) +(define (instance-of? rtd type) "Returns true if RTD is an instance of TYPE." - ((record-predicate type) rtd)) + (and (record? rtd) + ((record-predicate type) rtd))) ;; Bind the accessors for the fields of the record RTD to local ;; variables in BODY. RTD must be a record type descriptor. |