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
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe