
10 Feb
2005
10 Feb
'05
10:10 a.m.
At 13:33 09/02/05 +0000, Malcolm Wallace wrote:
Here's another one. I'm not sure what to call it, since 'permutation' means something subtly different.
-- Given a list of alphabets, return all possible strings with one -- symbol chosen from each alphabet respectively. permute :: [[a]] -> [[a]] permute [] = [[]] permute (xs:xss) = [ f:fs | f <- xs, fs <- permute xss ]
Doesn't 'sequence' do that? #g ------------ Graham Klyne For email: http://www.ninebynine.org/#Contact