summaryrefslogtreecommitdiffstats
path: root/recobj.scm
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:05:29 -0800
committerBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:05:29 -0800
commit8466d8cfa486fb30d1755c4261b781135083787b (patch)
treec8c12c67246f543c3cc4f64d1c07e003cb1d45ae /recobj.scm
parent87b82b5822ca54228cfa6df29be3ad9d4bc47d16 (diff)
downloadslib-8466d8cfa486fb30d1755c4261b781135083787b.tar.gz
slib-8466d8cfa486fb30d1755c4261b781135083787b.zip
Import Upstream version 3a1upstream/3a1
Diffstat (limited to 'recobj.scm')
-rw-r--r--recobj.scm11
1 files changed, 6 insertions, 5 deletions
diff --git a/recobj.scm b/recobj.scm
index 713f289..a634423 100644
--- a/recobj.scm
+++ b/recobj.scm
@@ -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)