From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Lars Brinkhoff Newsgroups: gmane.emacs.devel Subject: Re: User-reserved element in byte code vectors Date: 14 May 2004 21:50:45 +0200 Organization: nocrew Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <851xlmwzxm.fsf@junk.nocrew.org> References: <85smepfzqo.fsf@junk.nocrew.org> <85ad0wfkms.fsf_-_@junk.nocrew.org> <85oepcdts4.fsf_-_@junk.nocrew.org> <85vfjf9s4j.fsf@junk.nocrew.org> <20040502094316.GB2836@fencepost> <85fzaiakb9.fsf@junk.nocrew.org> <20040503195701.GD21891@fencepost> <85ekpz5twj.fsf@junk.nocrew.org> <874qqiao9o.fsf@tc-1-100.kawasaki.gol.ne.jp> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1084568735 30140 80.91.224.253 (14 May 2004 21:05:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 14 May 2004 21:05:35 +0000 (UTC) Cc: emacs-devel@gnu.org, rms@gnu.org, Miles Bader Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri May 14 23:05:25 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BOjrw-0005Tl-00 for ; Fri, 14 May 2004 23:05:24 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BOjrw-0008EB-00 for ; Fri, 14 May 2004 23:05:24 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BOjdB-00022l-69 for emacs-devel@quimby.gnus.org; Fri, 14 May 2004 16:50:09 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.34) id 1BOjRL-00086g-1q for emacs-devel@gnu.org; Fri, 14 May 2004 16:37:55 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.34) id 1BOjKE-0006mG-VT for emacs-devel@gnu.org; Fri, 14 May 2004 16:31:01 -0400 Original-Received: from [213.242.147.30] (helo=junk.nocrew.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BOizk-0002T6-QQ; Fri, 14 May 2004 16:09:28 -0400 Original-Received: from lars by junk.nocrew.org with local (Exim 3.35 #1 (Debian)) id 1BOihh-0003Nb-00; Fri, 14 May 2004 21:50:45 +0200 Original-To: Stefan Monnier In-Reply-To: Original-Lines: 31 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:23419 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:23419 Miles Bader writes: > This is a patch that adds `curried functions' as discussed, using the > #[...] syntax. > > (curry 'concat "The ") > => #[curry concat "The "] > > (mapcar (curry 'concat "The ") '("a" "b" "c")) > => ("The a" "The b" "The c") > > Does this look useful for your purposes Lars? Yes, very! Stefan Monnier writes: > Just some nitpicking: `curry' is the action of taking a function of > 2 arguments and turning it into a function of one arg that returns > another function that expects the second arg. When reading about currying in the context of Lisp, I've seen this many times: (defun curry (function &rest args1) (lambda (&rest args2) (apply function (append args1 args2)))) which I believe matches Miles' definition. -- Lars Brinkhoff, Services for Unix, Linux, GCC, HTTP Brinkhoff Consulting http://www.brinkhoff.se/