
17 Jun
2009
17 Jun
'09
5:24 a.m.
On Wed, 17 Jun 2009 00:45:56 -0400, you wrote:
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)
Sheer genius! I just inverted it since I like to see the main idea first. letterCombos = concat (tail sss) where sss = [""] : [ [ c:s | c <- ['a'..'z'], s <- ss ] | ss <- sss ] -- Regards, Casey