[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to improve the readability of (any) LISP or any highlevel functi
From: |
Jerome Baum |
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 |
User-agent: |
MicroPlanet-Gravity/3.0.4 |
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...
- Re: How to improve the readability of (any) LISP or any highlevel functional language to the level of FORTH ?, (continued)
- Re: How to improve the readability of (any) LISP or any highlevel functional language to the level of FORTH ?, Pascal J. Bourguignon, 2011/01/01
- Re: How to improve the readability of (any) LISP or any highlevel functional language to the level of FORTH ?, Nathan, 2011/01/01
- Re: How to improve the readability of (any) LISP or any highlevel functional language to the level of FORTH ?, Jan Burse, 2011/01/01
- Re: How to improve the readability of (any) LISP or any highlevel functional language to the level of FORTH ?, The Quiet Center, 2011/01/01
- Re: How to improve the readability of (any) LISP or any highlevel functional language to the level of FORTH ?, Jan Burse, 2011/01/01
- Re: How to improve the readability of (any) LISP or any highlevel functional language to the level of FORTH ?, LanX, 2011/01/01
- Re: How to improve the readability of (any) LISP or any highlevel functional language to the level of FORTH ?, LanX, 2011/01/01
- Re: How to improve the readability of (any) LISP or any highlevel functional language to the level of FORTH ?, Nathan, 2011/01/02
- Re: How to improve the readability of (any) LISP or any highlevel functional language to the level of FORTH ?, Paul Rubin, 2011/01/02
- Re: How to improve the readability of (any) LISP or any highlevel functional language to the level of FORTH ?, LanX, 2011/01/02
- Re: How to improve the readability of (any) LISP or any highlevel functional language to the level of FORTH ?,
Jerome Baum <=
- Re: How to improve the readability of (any) LISP or any highlevel functional language to the level of FORTH ?, Paul Rubin, 2011/01/02
- Re: How to improve the readability of (any) LISP or any highlevel functional language to the level of FORTH ?, w_a_x_man, 2011/01/02
- Re: How to improve the readability of (any) LISP or any highlevel functional language to the level of FORTH ?, w_a_x_man, 2011/01/02
- Re: How to improve the readability of (any) LISP or any highlevel functional language to the level of FORTH ?, LanX, 2011/01/03
- Re: How to improve the readability of (any) LISP or any highlevel functional language to the level of FORTH ?, Frank GOENNINGER, 2011/01/02
- Re: How to improve the readability of (any) LISP or any highlevel functional language to the level of FORTH ?, w_a_x_man, 2011/01/07
- Re: How to improve the readability of (any) LISP or any highlevelfunctional language to the level of FORTH ?, WJ, 2011/01/09
- Re: How to improve the readability of (any) LISP or any highlevel functional language to the level of FORTH ?, Didier Verna, 2011/01/03
- Re: How to improve the readability of (any) LISP or any highlevel functional language to the level of FORTH ?, Tim Harig, 2011/01/03
- Re: How to improve the readability of (any) LISP or any highlevel functional language to the level of FORTH ?, rusi, 2011/01/04