Re: design advice on predicate name

2006-08-19 Thread Marco Maggi
"Neil Jerram" wrote: >My intuition is that the NAN? name should be used only >for a procedure which takes a single number and reports >whether it is NAN or not (as #t/#f). Yes. The abstract behind having a NAN? for my custom vectors and matrices is to let the user write math functions that work fo

Re: accessor with 2/3 parameters

2006-08-19 Thread Marco Maggi
"Neil Jerram" wrote: >Well, the following seems to work ... >[...] >In other words, it appears that the args of >make-procedure-with-setter >can be generics. Yes! The following appears to do what I want: (use-modules (oop goops)) (define-class () (v #:init-keyword #:value)) (define-method (m

Re: accessor with 2/3 parameters

2006-08-19 Thread Neil Jerram
Neil Jerram <[EMAIL PROTECTED]> writes: > Not that I know of. I'll take a look at the code though. Well, the following seems to work ... (use-modules (oop goops)) (define-method (second (l )) (cadr l)) (define-method (set-second (l ) val) (set-car! (cdr l) val)) (define-method (second (l )) (ve

Re: design advice on predicate name

2006-08-19 Thread Neil Jerram
"Marco Maggi" <[EMAIL PROTECTED]> writes: > "Neil Jerram" wrote: >>"Marco Maggi" <[EMAIL PROTECTED]> writes: >>> Example: I have two predicates HIT-NAN? and MAP-NAN? >>> which one it is better to call NAN? >> >>I'm afraid I don't understand. Perhaps you could write >>the down for the two possib

Re: accessor with 2/3 parameters

2006-08-19 Thread Neil Jerram
"Marco Maggi" <[EMAIL PROTECTED]> writes: > So a working example is: > > ;; > > (use-modules (oop goops)) > > (debug-enable 'debug) > (debug-enable 'backtrace) > (debug-enable 'trace) > > > (define-class () > (v #:init-keyword #:value)) > > (define elm (