Article View: comp.lang.functional
Article #1203Re: How to improve the readability of (any) LISP or any highlevel functional language to the level of FORTH ?
From: Jerome Baum
Date: Sun, 02 Jan 2011 15:14
Date: Sun, 02 Jan 2011 15:14
26 lines
3098 bytes
3098 bytes
In article <ce0f5c3b-bc71-4868-8d2b-5495583ccfa8 @w18g2000vbe.googlegroups.com>, lanx.perl@googlemail.com says... > > Paul Rubin schrieb: > > > That is pretty ugly; in Haskell you could write > > > > my_list = [1, 1, 1, 1, 2, 3, 3, 1, 1, 4, 5, 5, 5, 5] > > main = print [head xs | xs <- group my_list] > > does this really produce the desired output? > Will the second 1 really be printed? > > And why do you guys switch to operate on digits instead of strings? http://codepad.org/eGFuJrHZ import List my_list = ["one", "one", "one", "one", "two", "three", "three", "one", "one", "four", "five", "five", "five", "five"] main = print [head xs | xs <- group my_list] Output: ["one","two","three","one","four","five"] Works fine for me...
Technical Details
Message-ID:
<MPG.278ab4c896daa26398968a@news.tornevall.net>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!weretis.net!feeder4.news.weretis.net!news.tornevall.net!.POSTED!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> <aa0e6de9-26c7-4a98-93af-24d0188a3506@m35g2000vbn.googlegroups.com> <3bd9f0cb-a400-4332-adf2-27cddb1a2db6@l7g2000vbv.googlegroups.com> <1347a932-5751-4c20-9c4a-5594ed860ea6@35g2000prb.googlegroups.com> <7x8vz3vm4v.fsf@ruckus.brouhaha.com> <ce0f5c3b-bc71-4868-8d2b-5495583ccfa8@w18g2000vbe.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-7-bit Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!weretis.net!feeder4.news.weretis.net!news.tornevall.net!.POSTED!not-for-mail From: Jerome Baum <jerome@jeromebaum.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: Sun, 2 Jan 2011 16:14:33 +0100 Organization: TornevallNET - http://news.tornevall.net Lines: 26 Message-ID: <MPG.278ab4c896daa26398968a@news.tornevall.net> 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> <aa0e6de9-26c7-4a98-93af-24d0188a3506@m35g2000vbn.googlegroups.com> <3bd9f0cb-a400-4332-adf2-27cddb1a2db6@l7g2000vbv.googlegroups.com> <1347a932-5751-4c20-9c4a-5594ed860ea6@35g2000prb.googlegroups.com> <7x8vz3vm4v.fsf@ruckus.brouhaha.com> <ce0f5c3b-bc71-4868-8d2b-5495583ccfa8@w18g2000vbe.googlegroups.com> NNTP-Posting-Host: 180d5c58a27c4b910efa4394eb5038a5 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: 29742bfe4dc51d05f76e96368fff71c2 X-Complaints-To: abuse@tornevall.net User-Agent: MicroPlanet-Gravity/3.0.4 X-Complaints-Language: Spoken language is english or swedish - NOT ITALIAN, FRENCH, GERMAN OR ANY OTHER LANGUAGE! X-UserIDNumber: 2490 X-Validate-Post: http://news.tornevall.net/validate.php?trace=29742bfe4dc51d05f76e96368fff71c2 X-Complaints-Italiano: Non abbiamo padronanza della lingua italiana - se mandate una email scrivete solo in Inglese, grazie X-Posting-User: 933c0536f0b80be149ba106e43a6da2a