From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Marco Maggi" Newsgroups: gmane.lisp.guile.user Subject: Re: design advice on predicate name Date: Sun, 20 Aug 2006 08:29:08 +0200 Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1156055357 12526 80.91.229.2 (20 Aug 2006 06:29:17 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 20 Aug 2006 06:29:17 +0000 (UTC) Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sun Aug 20 08:29:15 2006 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GEgo6-000869-H3 for guile-user@m.gmane.org; Sun, 20 Aug 2006 08:29:14 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GEgo6-0001DO-20 for guile-user@m.gmane.org; Sun, 20 Aug 2006 02:29:14 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GEgo2-0001DG-Ga for guile-user@gnu.org; Sun, 20 Aug 2006 02:29:10 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GEgo1-0001Cy-9L for guile-user@gnu.org; Sun, 20 Aug 2006 02:29:09 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GEgo1-0001Ct-2e for guile-user@gnu.org; Sun, 20 Aug 2006 02:29:09 -0400 Original-Received: from [62.241.4.118] (helo=relay-pt4.poste.it) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GEgv7-0001HX-9n for guile-user@gnu.org; Sun, 20 Aug 2006 02:36:29 -0400 Original-Received: from poste.it (192.168.144.52) by relay-pt4.poste.it (7.2.063) (authenticated as marco.maggi-ipsu@poste.it) id 4485AE8A0017C4D7 for guile-user@gnu.org; Sun, 20 Aug 2006 08:29:08 +0200 X-Sensitivity: 3 Original-To: "guile-user" X-XaM3-API-Version: 4.1 (B107) X-SenderIP: 62.10.52.230 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:5464 Archived-At: "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 Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user