
17 Jun
2009
17 Jun
'09
6:37 a.m.
Reid Barton wrote:
I'm surprised everyone is giving clever recursive solutions rather than
concatMap (\n -> replicateM n ['a'..'z']) [1..]
Regards, Reid
Well, you've lost efficient sharing with respect to my previous solution and one other. But it's a fair call, so... tail $ concat $ iterate (map (:) ['a'..'z'] <*>) [[]] Regards, Matthew