diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2017-02-20 00:05:29 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2017-02-20 00:05:29 -0800 |
commit | 8466d8cfa486fb30d1755c4261b781135083787b (patch) | |
tree | c8c12c67246f543c3cc4f64d1c07e003cb1d45ae /recobj.scm | |
parent | 87b82b5822ca54228cfa6df29be3ad9d4bc47d16 (diff) | |
download | slib-8466d8cfa486fb30d1755c4261b781135083787b.tar.gz slib-8466d8cfa486fb30d1755c4261b781135083787b.zip |
Import Upstream version 3a1upstream/3a1
Diffstat (limited to 'recobj.scm')
-rw-r--r-- | recobj.scm | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -5,13 +5,14 @@ (require 'object) (require 'common-list-functions) - +(define field:position position) +;@ (define record-type-name (make-generic-method)) (define record-accessor (make-generic-method)) (define record-modifier (make-generic-method)) (define record? (make-generic-predicate)) (define record-constructor (make-generic-method)) - +;@ (define (make-record-type type-name field-names) (define self (make-object)) @@ -20,7 +21,7 @@ type-name)) (make-method! self record-accessor (lambda (self field-name) - (let ((index (comlist:position field-name field-names))) + (let ((index (field:position field-name field-names))) (if (not index) (slib:error "record-accessor: invalid field-name argument." field-name)) @@ -29,7 +30,7 @@ (make-method! self record-modifier (lambda (self field-name) - (let ((index (comlist:position field-name field-names))) + (let ((index (field:position field-name field-names))) (if (not index) (slib:error "record-accessor: invalid field-name argument." field-name)) @@ -54,4 +55,4 @@ self) (provide 'record-object) -(provide 'record)
\ No newline at end of file +(provide 'record) |