[Haskell-cafe] Re: Query on list comprehension

Jon Fairbairn jon.fairbairn at cl.cam.ac.uk
Thu Mar 19 06:12:51 EDT 2009

Henning Thielemann <lemming at henning-thielemann.de> writes:

> On Tue, 17 Mar 2009, Melanie_Green wrote:
>> What are the limitations of list comprehension. I want to use
>> listcomprehension to output the pattern below. So a mixture of a's and
>> newline characters. The part im stuck at is creating arguments in the
>> listcomprehension to stop at some point then execute next loop. Is it even
>> possible to create the pattern below purely from list comprehension.Thankyou
>> in advance.
>> a
>> aa
>> aaa
> iterate ('a':) "\n"

Game to Henning Thielemann!

Jón Fairbairn                                 Jon.Fairbairn at cl.cam.ac.uk
http://www.chaos.org.uk/~jf/Stuff-I-dont-want.html  (updated 2009-01-31)

More information about the Haskell-Cafe mailing list