"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 for both numbers and composite numeric objects. To let him try them out. I am not sure about how significant it is, though. "Neil Jerram" wrote: >Is it a feature of Octave that any predicate can >automatically map over a vector, or can `isnan' only >be applied to a vector? Predicates that act upon numbers can be applied to numbers, vectors and matrices. And they always work like MAP-NAN? Using the number/vector/matrix oriented functions of Octave it is possible to write custom predicates that behave in the same way. Octave also has 'all()' and 'any()' which return a single 0/1 result if all or any of the elements of a num/vec/mat is 0 or 1. So Octave requires two functions call to achieve the result of HIT-NAN? -- Marco Maggi "They say jump!, you say how high?" Rage Against the Machine - "Bullet in the Head" _______________________________________________ Guile-user mailing list [email protected] http://lists.gnu.org/mailman/listinfo/guile-user
