guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: design advice on predicate name


From: Neil Jerram
Subject: Re: design advice on predicate name
Date: Fri, 18 Aug 2006 14:49:31 +0100
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

"Marco Maggi" <address@hidden> 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 functions with
> math operators that act upon common numbers or vector and
> matrices without visible difference.
>
>   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.

>   By the way: the NUMBER? predicate is supposed to return
> #t for proper number SMOBs or for any object that can
> be used as argument of math operators?

No, number? is supposed to return #t only for Guile's built-in numeric
types.

Regards,
     Neil





reply via email to

[Prev in Thread] Current Thread [Next in Thread]