Article View: comp.lang.functional
Article #1172Re: How to improve the readability of (any) LISP or any highlevel functional language to the level of FORTH ?
From: LanX
Date: Mon, 03 Jan 2011 15:22
Date: Mon, 03 Jan 2011 15:22
9 lines
2328 bytes
2328 bytes
On 2 Jan., 07:59, w_a_x_man <w_a_x_...@yahoo.com> wrote:
> p=nil; %w(a a a b c c a a d e e e).select{|x| x!=p && p=x}
> ==>["a", "b", "c", "a", "d", "e"]
and by translating my perl code you also inherited it's restrictions
p=nil; ["a","a","b",false,false,"e"].select{|x| x!=p && p=x}
=> ["a", "b", "e"]
Technical Details
Message-ID:
<1a4ef56c-a7c4-4717-82bb-b2b86364e270@i41g2000vbn.googlegroups.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!postnews.google.com!i41g2000vbn.googlegroups.com!not-for-mailReferences:
<80ceeca0-1d32-47d1-ba96-feb4d9729c3a@v17g2000yqv.googlegroups.com> <87pqsgk8v9.fsf@kuiper.lan.informatimago.com> <ca15d8c3-86db-46fd-b35f-1a2596475769@n32g2000pre.googlegroups.com> <9e7a7683-a92a-4e88-a6f1-9e6a6bd2f057@z9g2000yqz.googlegroups.com> <617eae48-d532-4eb1-aefa-b54ca3d23654@r19g2000prm.googlegroups.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 107f24,1641de092071599d X-Google-NewGroupId: yes X-Google-Thread: f4fd2,1641de092071599d X-Google-NewGroupId: yes X-Google-Thread: 103b8b,1641de092071599d X-Google-NewGroupId: yes X-Google-Thread: fd7c9,1641de092071599d X-Google-NewGroupId: yes X-Google-Thread: f907c,1641de092071599d X-Google-NewGroupId: yes X-Google-Attributes: gid4e63bbc566,gidf85ca024c1,gid39ae015015,gid2832dde05d,gidee3de009bc,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: arc1-ca.pugleaf.net!g2news2.google.com!postnews.google.com!i41g2000vbn.googlegroups.com!not-for-mail From: LanX <lanx.perl@googlemail.com> Newsgroups: comp.lang.functional,comp.lang.lisp,gnu.emacs.help,comp.lang.forth,comp.lang.prolog Subject: Re: How to improve the readability of (any) LISP or any highlevel functional language to the level of FORTH ? Date: Mon, 3 Jan 2011 07:22:24 -0800 (PST) Organization: http://groups.google.com Lines: 9 Message-ID: <1a4ef56c-a7c4-4717-82bb-b2b86364e270@i41g2000vbn.googlegroups.com> References: <80ceeca0-1d32-47d1-ba96-feb4d9729c3a@v17g2000yqv.googlegroups.com> <87pqsgk8v9.fsf@kuiper.lan.informatimago.com> <ca15d8c3-86db-46fd-b35f-1a2596475769@n32g2000pre.googlegroups.com> <9e7a7683-a92a-4e88-a6f1-9e6a6bd2f057@z9g2000yqz.googlegroups.com> <617eae48-d532-4eb1-aefa-b54ca3d23654@r19g2000prm.googlegroups.com> NNTP-Posting-Host: 89.12.64.143 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1294068145 13513 127.0.0.1 (3 Jan 2011 15:22:25 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 3 Jan 2011 15:22:25 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: i41g2000vbn.googlegroups.com; posting-host=89.12.64.143; posting-account=W9fpQwoAAADZYmkl-8sXk1VPxG3rq-Pd User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.0.19) Gecko/2010040118 Ubuntu/8.10 (intrepid) Firefox/3.0.19,gzip(gfe)