Received: from mx0.gmx.net (mx0.gmx.net [213.165.64.100]) by h1439878.stratoserver.net (8.14.2/8.14.2/Debian-2build1) with SMTP id p2IDmrbL001740 for ; Fri, 18 Mar 2011 14:48:54 +0100 Received: (qmail 26507 invoked by alias); 18 Mar 2011 13:48:48 -0000 Delivered-To: GMX delivery to rainer.schoepf@gmx.net Received: (qmail invoked by alias); 18 Mar 2011 13:48:47 -0000 Received: from relay2.uni-heidelberg.de (EHLO relay2.uni-heidelberg.de) [129.206.210.211] by mx0.gmx.net (mx009) with SMTP; 18 Mar 2011 14:48:47 +0100 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id p2IDkUhT007222 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 18 Mar 2011 14:46:31 +0100 Received: from listserv.uni-heidelberg.de (localhost.localdomain [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id p2IDcdeP011272; Fri, 18 Mar 2011 14:46:29 +0100 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 1223122 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Fri, 18 Mar 2011 14:46:29 +0100 Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.210.211]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id p2IDkTst015303 for ; Fri, 18 Mar 2011 14:46:29 +0100 Received: from mail-gw0-f49.google.com (mail-gw0-f49.google.com [74.125.83.49]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id p2IDkOC3007180 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=FAIL) for ; Fri, 18 Mar 2011 14:46:28 +0100 Received: by gwb1 with SMTP id 1so2478787gwb.22 for ; Fri, 18 Mar 2011 06:46:24 -0700 (PDT) MIME-Version: 1.0 Received: by 10.146.215.30 with SMTP id n30mr1126561yag.31.1300455983871; Fri, 18 Mar 2011 06:46:23 -0700 (PDT) Received: by 10.147.168.17 with HTTP; Fri, 18 Mar 2011 06:46:23 -0700 (PDT) References: <905C5ED0-6639-4DEB-95AC-A2FCB2C4491D@gmail.com> <935A1EA2-C971-4A3A-8DF4-6F890E0CFB32@gmail.com> <5256FD2C-CD53-4FF0-A405-5B8B2781E5EC@gmail.com> <19843.17637.935263.780194@morse.mittelbach-online.de> <4D835315.3040004@residenset.net> Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Whitelist: Message-ID: Date: Fri, 18 Mar 2011 09:46:23 -0400 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Bruno Le Floch Subject: Re: expl3's seq_pop_right etc. To: LATEX-L@listserv.uni-heidelberg.de In-Reply-To: <4D835315.3040004@residenset.net> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-GMX-Antispam: 0 (Mail was not recognized as spam); Detail=5D7Q89H36p77e5KAPs1l6v/Sb97LojnDtMgfETrECMLUO9erHzOJe+OynZRhvlGqb5A0X bbiCt2rAnnct/NAlbHMvoAL6GY+23tB3khNK7au3fkL89Y026H2WJg1zsjGg0I0r5V9ldzzR5wBB /r19Q==V1; X-Resent-By: Forwarder X-Resent-For: rainer.schoepf@gmx.net X-Resent-To: rainer@rainer-schoepf.de Status: R X-Status: X-Keywords: X-UID: 6688 Sorry Lars, I got your surname completely wrong in my previous email. (not sure why that happened) >> a constructed function name ie "c" though that is something you would >> seldom need I guess. > > And it would be covered by applying a suitable \exp_args:... to the > ..._map_function:... call, would it not? The simplest would be \cs_set_eq:NN \..._map_function:NN \..._map_function:Nn \cs_generate_variant:Nn \..._map_function:NN {Nc} > ...map_function:Nn \l_foo_seq { \func:nn{foo} } > > rather do > > \cs_new:Npn \map_func:n #1 { \func:nn{foo}{#1} } > > ...map_function:NN \l_foo_seq \map_func:n > > ? The downside of this is that it hardwires the "foo" into a function > body, when in practice it might be data that changes from call to call. > You can of course redefine \map_func:n before every use, but it feels > unelegant. In the current implementation, if expandability is not an issue, prefer map_inline, as it does not require any test for termination. \seq_map_inline:Nn \l_foo_seq { \func:nn {foo} {#1} } But if you need expandability, then map_function is required. > \cs_new:Npn \exch_args:Nnnn #1 #2 #3 #4 { #1{#2}{#4}{#3} } I'd personally call it \use_i_bii_biv_biii:nnnn, where "b" means "braced". This is more extensible, and fits with the current \use_i_ii:nnn. > but \exch_args:Nnnn is more elegant, since it can be reused in more places. Regards, -- Bruno