From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ian Price Newsgroups: gmane.lisp.guile.user Subject: Re: and-let* is not composable? Date: Tue, 10 Sep 2013 18:57:52 +0100 Message-ID: <87li34mue7.fsf@Kagami.home> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1378835894 25860 80.91.229.3 (10 Sep 2013 17:58:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 10 Sep 2013 17:58:14 +0000 (UTC) Cc: "guile-user@gnu.org" To: Panicz Maciej Godek Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Sep 10 19:58:17 2013 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VJSCe-0007qG-7j for guile-user@m.gmane.org; Tue, 10 Sep 2013 19:58:16 +0200 Original-Received: from localhost ([::1]:59377 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJSCd-0003qV-Tu for guile-user@m.gmane.org; Tue, 10 Sep 2013 13:58:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39742) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJSCR-0003qF-86 for guile-user@gnu.org; Tue, 10 Sep 2013 13:58:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VJSCN-0005wd-5G for guile-user@gnu.org; Tue, 10 Sep 2013 13:58:03 -0400 Original-Received: from mail-we0-x22e.google.com ([2a00:1450:400c:c03::22e]:53853) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJSCM-0005wQ-TQ for guile-user@gnu.org; Tue, 10 Sep 2013 13:57:59 -0400 Original-Received: by mail-we0-f174.google.com with SMTP id q58so5809120wes.5 for ; Tue, 10 Sep 2013 10:57:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=from:to:cc:subject:references:mail-followup-to:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=OgS/spXlfuX9RgDzHJOHZuNJFeQqGta58sQ8EoRZPDw=; b=H6nL25E8WpNOUZsqGxTXC3YfOEnTw7vHurZ2wqYL7B68Oq9LVTbOI26W9NInKYR5wU 89yvzV4Eqy/6EqiaO7IA4T5cLkhOyg1fZjPQoqXs0uVklDMaLEfrZeIyqSB69iDuxzOU mU51bnENRfwK55aK3B9zq7atqkcUzX/ta+IUechx0RSztXA8CAkftyGQ2Kt14grqopCt ABgFNkJ7zP3X8OZKJIl6IDaaocCZw4Z664t7Qa4acJCJtKQRVxc0RwoBCO8VDjKhD2xI XLn2TFF98jOuSPv8po7If9ls2F7H9gEctLz5iPhee7lo5FIFc3Cs2RCqmUZU0cQHFAr5 gHpQ== X-Received: by 10.194.77.167 with SMTP id t7mr18462782wjw.27.1378835877936; Tue, 10 Sep 2013 10:57:57 -0700 (PDT) Original-Received: from Kagami.home (host109-157-170-145.range109-157.btcentralplus.com. [109.157.170.145]) by mx.google.com with ESMTPSA id b13sm4824579wiv.1.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 10 Sep 2013 10:57:56 -0700 (PDT) Mail-Followup-To: Panicz Maciej Godek , "guile-user\@gnu.org" In-Reply-To: (Panicz Maciej Godek's message of "Mon, 9 Sep 2013 19:35:16 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c03::22e X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:10792 Archived-At: I have a few notes unrelated to those I've already mentioned in the thread. 1. Guile already has curried definitions in (ice-9 curried-definitions) 2. By turning your functions definitions into a macro, you've lost the ability to use them in a first class manner. 3. I would strongly recommend _not_ using define-macro, and even more so, not mixing define-macro and syntax-rules in a macro. Syntax-case is as powerful as defmacro, and in most practical cases, about as much writing. 4. What your macro does is not currying, it is partial application. Those are different things. Currying refers to the process of turning a function of n arguments into an n-nested set of 1 argument functions. Partial application is, well, not supplying all the arguments to a function. You can have partial application without currying, as your macro shows. -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"