
17 Jun
2009
17 Jun
'09
9:20 a.m.
On Wed, 17 Jun 2009, Matthew Brecknell wrote:
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'] <*>) [[]]
cool