[Haskell-cafe] Need some help with an infinite list
José Prous
hiena03 at gmail.com
Tue Jun 16 21:15:36 EDT 2009
this appears to work:
alphabet=map (\x->x:[]) ['a'..'z']
series=alphabet++[x++y|x<-series,y<-alphabet]
On Tue, Jun 16, 2009 at 8:28 PM, GüŸnther Schmidt <gue.schmidt at web.de>wrote:
> Hi guys,
>
> I'd like to generate an infinite list, like
>
> ["a", "b", "c" .. "z", "aa", "ab", "ac" .. "az", "ba", "bb", "bc" .. "bz",
> "ca" ...]
>
> When I had set out to do this I thought, oh yeah no prob, in a heartbeat.
>
> Uhm.
>
> Help, pls!
>
> Günther
>
> PS: I know this should be a no-brainer, sry
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090616/1be0deb0/attachment.html
More information about the Haskell-Cafe
mailing list