[Haskell-cafe] Need some help with an infinite list

Daniel Peebles pumpkingod at gmail.com
Tue Jun 16 22:21:04 EDT 2009


My solution attempted to exploit this using Numeric.showIntAtBase but
failed because of the lack of 0 prefixes in the numbers. If you can
find a simple way to fix it without duplicating the showIntAtBase
code, I'd be interested!

On Tue, Jun 16, 2009 at 10:01 PM, Richard O'Keefe<ok at cs.otago.ac.nz> wrote:
>
> On 17 Jun 2009, at 12:28 pm, GüŸnther Schmidt 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.
>
> Let me change this slightly.
>
> ["0","1",...,"9","00","01",..,"99","000",..."999",...]
>
> Does that provide a hint?
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>


More information about the Haskell-Cafe mailing list