From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jerome Baum Newsgroups: gmane.emacs.help 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 Message-ID: References: <80ceeca0-1d32-47d1-ba96-feb4d9729c3a@v17g2000yqv.googlegroups.com> <87pqsgk8v9.fsf@kuiper.lan.informatimago.com> <9e7a7683-a92a-4e88-a6f1-9e6a6bd2f057@z9g2000yqz.googlegroups.com> <3bd9f0cb-a400-4332-adf2-27cddb1a2db6@l7g2000vbv.googlegroups.com> <1347a932-5751-4c20-9c4a-5594ed860ea6@35g2000prb.googlegroups.com> <7x8vz3vm4v.fsf@ruckus.brouhaha.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1293989193 4424 80.91.229.12 (2 Jan 2011 17:26:33 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 2 Jan 2011 17:26:33 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jan 02 18:26:29 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PZRhL-00053c-G0 for geh-help-gnu-emacs@m.gmane.org; Sun, 02 Jan 2011 18:26:27 +0100 Original-Received: from localhost ([127.0.0.1]:49337 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PZRhK-0004Tz-TC for geh-help-gnu-emacs@m.gmane.org; Sun, 02 Jan 2011 12:26:26 -0500 Original-Path: usenet.stanford.edu!goblin1!goblin.stu.neva.ru!news.tornevall.net!.POSTED!not-for-mail Original-Newsgroups: comp.lang.functional, comp.lang.lisp, gnu.emacs.help, comp.lang.forth, comp.lang.prolog Original-Lines: 26 Original-NNTP-Posting-Host: 180d5c58a27c4b910efa4394eb5038a5 Original-X-Trace: 29742bfe4dc51d05f76e96368fff71c2 Original-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 Original-Xref: usenet.stanford.edu comp.lang.functional:69077 comp.lang.lisp:297115 gnu.emacs.help:183849 comp.lang.forth:160261 comp.lang.prolog:44010 X-Mailman-Approved-At: Sun, 02 Jan 2011 12:21:21 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:78062 Archived-At: In article , 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...