
17 Jun
2009
17 Jun
'09
4:45 a.m.
At 4:25 PM +1200 6/17/09, Richard O'Keefe wrote:
On 17 Jun 2009, at 2:01 pm, Richard O'Keefe wrote: On second thoughts,
let strings = "" : [pref++[last] | pref <- strings, last <- ['a'..'z']] in tail strings
seems more Haskellish than the stupidly clever counting-based code I had in mind. With this it's much easier to see what it's up to.
And here's a version along similar lines that avoids (++) for greater sharing and efficiency: let sss = [""] : [ [ c:s | c <- ['a'..'z'], s <- ss ] | ss <- sss ] in concat (tail sss)