bracketOnError, while, forever

Ross Paterson ross at soi.city.ac.uk
Wed Feb 9 08:37:42 EST 2005


On Wed, Feb 09, 2005 at 01:33:37PM +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 ]

sequence?


More information about the Libraries mailing list