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: Fri, 18 Aug 2006 21:01:54 +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 1155927741 324 80.91.229.2 (18 Aug 2006 19:02:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 18 Aug 2006 19:02:21 +0000 (UTC) Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Fri Aug 18 21:02:17 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 1GE9bU-0004xq-HD for guile-user@m.gmane.org; Fri, 18 Aug 2006 21:02:01 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GE9bU-00080K-32 for guile-user@m.gmane.org; Fri, 18 Aug 2006 15:02:00 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GE9bQ-00080F-MW for guile-user@gnu.org; Fri, 18 Aug 2006 15:01:56 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GE9bP-000801-I3 for guile-user@gnu.org; Fri, 18 Aug 2006 15:01:55 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GE9bP-0007zx-Ew for guile-user@gnu.org; Fri, 18 Aug 2006 15:01:55 -0400 Original-Received: from [62.241.4.129] (helo=relay-pt3.poste.it) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GE9iA-0007lr-TV for guile-user@gnu.org; Fri, 18 Aug 2006 15:08:55 -0400 Original-Received: from poste.it (192.168.144.52) by relay-pt3.poste.it (7.2.063) (authenticated as marco.maggi-ipsu@poste.it) id 4485AE830017600F for guile-user@gnu.org; Fri, 18 Aug 2006 21:01:54 +0200 X-Sensitivity: 3 Original-To: "guile-user" X-XaM3-API-Version: 4.1 (B107) X-SenderIP: 62.10.43.117 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:5458 Archived-At: "Neil Jerram" wrote: >"Marco Maggi" 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 real numbers like this [1 +nan.0 3]: * hit-nan? returns #t because at least one element is nan; * map-nan? returns #(#f #t #f), one boolean for each element; the same for matrices. map-nan? works like the 'isnan' function of GNU Octave, which for the example vector would return [0 1 0]. hit-nan? can be used in the conditional of IF and COND, while map-nan? must be inspected. For this reason I guess that hit-nan? should be the nan?, but, to the best of my knowledge, GNU Octave defines only the map-nan? equivalent so I do not know how useful can be hit-nan? in practice. -- 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