From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.lisp.guile.user Subject: Re: currying Date: Tue, 07 Sep 2010 17:07:12 +0200 Message-ID: <87vd6h384f.fsf@ambire.localdomain> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1283872303 13474 80.91.229.12 (7 Sep 2010 15:11:43 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 7 Sep 2010 15:11:43 +0000 (UTC) Cc: guile-user@gnu.org To: "Eric J. Van der Velden" Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Sep 07 17:11:42 2010 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Oszpi-0004db-GA for guile-user@m.gmane.org; Tue, 07 Sep 2010 17:11:41 +0200 Original-Received: from localhost ([127.0.0.1]:41882 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oszpe-0005em-HM for guile-user@m.gmane.org; Tue, 07 Sep 2010 11:11:34 -0400 Original-Received: from [140.186.70.92] (port=59587 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oszp2-0005PE-1S for guile-user@gnu.org; Tue, 07 Sep 2010 11:11:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oszou-0000mQ-1Z for guile-user@gnu.org; Tue, 07 Sep 2010 11:10:53 -0400 Original-Received: from smtp208.alice.it ([82.57.200.104]:35276) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oszot-0000le-KC for guile-user@gnu.org; Tue, 07 Sep 2010 11:10:47 -0400 Original-Received: from ambire.localdomain (87.0.69.34) by smtp208.alice.it (8.5.124.08) id 4C1A271604B8EC12; Tue, 7 Sep 2010 17:10:41 +0200 Original-Received: from ttn by ambire.localdomain with local (Exim 4.69) (envelope-from ) id 1OszlR-0001c4-DU; Tue, 07 Sep 2010 17:07:13 +0200 In-Reply-To: (Eric J. Van der Velden's message of "Mon, 6 Sep 2010 21:36:58 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Windows 98 (1) 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:8164 Archived-At: () "Eric J. Van der Velden" () Mon, 6 Sep 2010 21:36:58 +0200 (define neither (both (compose not)) The first one doesn't compile. The second one does, but this is not what I meant; It suspects two arguments, the '() '() for example, instead of one, the funtion null? for example. Can I define (neither) is some way that I can do something like ((neither null?)'(a)'(a)) Presuming that you'd like this expression to have value #t, try: (define neither (lambda (p?) (both ((compose not) p?)))) aka (define (neither p?) (both ((compose not) p?))) Style nit: i somewhat dislike the one-arg =E2=80=98compose=E2=80=99. IMHO,= the procedure most befitting that name should take any number of args, including zero. That complicates the implementation, but such is life on the edge of the knife...