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 q12BPrcd021810 for ; Thu, 2 Feb 2012 12:25:54 +0100 Received: (qmail 24112 invoked by alias); 2 Feb 2012 11:25:44 -0000 Delivered-To: GMX delivery to rainer.schoepf@gmx.net Received: (qmail invoked by alias); 02 Feb 2012 11:25:44 -0000 Received: from relay2.uni-heidelberg.de (EHLO relay2.uni-heidelberg.de) [129.206.210.211] by mx0.gmx.net (mx043) with SMTP; 02 Feb 2012 12:25:44 +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 q12AiO9o005135 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 2 Feb 2012 11:44:24 +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 q12AJpLP006469; Thu, 2 Feb 2012 11:44:23 +0100 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 2018805 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Thu, 2 Feb 2012 11:44:23 +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 q12AiNmf010670 for ; Thu, 2 Feb 2012 11:44:23 +0100 Received: from lon1-msapost-2.mail.demon.net (lon1-msapost-2.mail.demon.net [195.173.77.181]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id q12Ai8I9004989 for ; Thu, 2 Feb 2012 11:44:13 +0100 Received: from capjwrightlap.che.uea.ac.uk ([139.222.113.12]) by lon1-post-2.mail.demon.net with esmtpsa (AUTH morningstar2) (TLSv1:AES256-SHA:256) (Exim 4.69) id 1Rsu9A-0006XW-bz; Thu, 02 Feb 2012 10:44:08 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 MIME-Version: 1.0 References: <20120202102957.GB14566@csmvddesktop> X-Enigmail-Version: 1.3.5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <4F2A68F9.1010508@morningstar2.co.uk> Date: Thu, 2 Feb 2012 10:44:09 +0000 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Joseph Wright Subject: Re: Mapping Functions Versions for All and Some To: LATEX-L@listserv.uni-heidelberg.de In-Reply-To: <20120202102957.GB14566@csmvddesktop> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-GMX-Antispam: 0 (Sender is in whitelist: joseph.wright@MORNINGSTAR2.CO.UK); Detail=5D7Q89H36p4L00VTXC6D4q0N+AH0PUCnBi0P5cROEGjO+pG7NAH/K+tf9SrVFtpLrKONl 2T9EL4W4U4jgzLbnCcGpk1z/zwmKT/K1fv3lD0=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: 7001 On 02/02/2012 10:29, dongen wrote: > Howsagoin, > > > I've started exploring the LaTeX3 sources documentation but > I couldn't find the equivalent of the following predicate > functions for token lists: > > o \tl_all_TF:NNTF > results in if all members of satisfy > . The semantics should be that the evaluation > is start-to-finish of but that the evaluation > is aborted as soon as one of the tokens in > doesn't satisfy . > o \tl_some_TF:NNTF > results in if some member of satisfies > . The semantics should be that the evaluation > is start-to-finish of but that the evaluation > is aborted as soon as one of the tokens in > satisfies . > > Similar versions may also be useful for other kinds of lists. > > Are such macros defined? If not, do you think it's a good idea > to introduce them? > > Regards, > > > Marc van Dongen Hello Marc, There is certainly nothing at present in l3kernel to do this. What I am not sure of here is a use case: these seem somewhat unusual functions. Although it is not yet in l3kernel, I wonder if this is a job for the l3regex module that Bruno has written. Using a regex, it is possible to specify complex token list requirements without needing lots of dedicated functions (at the cost of performance). (The regex code is in l3experimental.) For example, The following shoul (I hope) match a token list made up entirely of letters with category code 'letter' \regex_match:nnTF { } { ^\c[a-zA-Z]L+$ } ... -- Joseph Wright