Re: and base class?

2006-08-18 Thread Marco Maggi
Yes! works. -- Marco Maggi "They say jump!, you say how high?" Rage Against the Machine - "Bullet in the Head" ___ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user

Re: design advice on predicate name

2006-08-18 Thread Marco Maggi
"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 possibilities that you have in mind. For a vector of rea

accessor with 2/3 parameters

2006-08-18 Thread Marco Maggi
Ciao, I wanted to create an accessor called ELM with synopsis: (set! (elm obj key) value) (elm obj key) which is the same required by the VECTOR-SET! and VECTOR-REF pair. For this both the #:accessor keyword of class definition and the explicit definition: (define-method (elm (obj ) k

Re: acosh, getting consistent results from GSL and Guile

2006-08-18 Thread Daniel Llorens del Río
On 18 Aug, 2006, at 18:07, [EMAIL PROTECTED] wrote: Browsing Wikipedia for acosh formulas it seems to me that GSL is using an equivalent of: (log (- x (sqrt (- (* x x) 1 while the others are using an equivalent of: (log (+ x (sqrt (- (* x x) 1 I'm interested in having equal r

Re: acosh, getting consistent results from GSL and Guile

2006-08-18 Thread Neil Jerram
"Marco Maggi" <[EMAIL PROTECTED]> writes: > Ciao, > > on the GNU Scientific Library mailing list I asked the > following: > >>for some values of the operand I get different >>results from 'acosh' when using GSL (1.8), Guile (1.8) >>and GNU Octave (2.1.63). Other functions give me >>differ

Re: and base class?

2006-08-18 Thread Neil Jerram
"Marco Maggi" <[EMAIL PROTECTED]> writes: > Ciao, > > when I define a generic function that accepts a procedure > or generic function as parameter I have to define two > identical functions: > > (define-method (map (p ) ... > (define-method (map (p ) ... > > is there a base class for and ?

Re: design advice on predicate name

2006-08-18 Thread Neil Jerram
"Marco Maggi" <[EMAIL PROTECTED]> writes: > Ciao, > > I have two predicate functions that act upon a vector > or matrix: the hit predicate produces a single #t/#f > result while the map predicate produces a vector or rank > 2 array of #t/#f values. > > Using generic functions I can write funct