This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
trouble with predicate of defined-record-type
- From: Mike <allymonster at gmail dot com>
- To: kawa at sourceware dot org
- Date: Wed, 1 Feb 2006 12:33:21 -0500
- Subject: trouble with predicate of defined-record-type
I am having trouble getting the predicate of a defined record to work
properly when passing it and a a quoted list to the 'every' procedure
that is defined in SRFI1. For instance, If I do:
(load "d:\\apps\\scheme\\kawa-1.8\\gnu\\kawa\\slib\\srfi1.scm")
(define-record-type rec
(make-rec x y)
rec?
(x rec-x)
(y rec-y))
(define a (make-rec 1 2))
(define b (make-rec 3 4))
then
(every rec? (list a b))
returns true (as expected), but
(every rec? '(a b))
unexpectedly returns false. However if I use a 'normal' procedure such as this
(define less-than-3? (lambda (n) (< n 3)))
then both of the following return true, as I would think they should:
(every less-than-3? (list 1 2))
(every less-than-3? '(1 2))
Can someone show me what I am doing wrong here? I am fairly new to
Scheme, so its most likely something dumb on my part. I just can't
figure out what.
Also, if comp.lang.scheme or the like would be more appropriate for
this sort of question, please let me know. I'm not sure if my problem
is Kawa-specific or not.
Thanks, Mike