Data.List permutations

Malcolm Wallace malcolm.wallace at cs.york.ac.uk
Tue Aug 4 16:57:46 EDT 2009


> Your function is not equivalent:
>
> perm _|_ = _|_
>
> permutations _|_ = _|_ : _|_

I have a vague memory that the library version diagonalises properly,  
so that if you give it a lazy infinite input, it still generates  
sensible output lazily.  If so, this important property should be  
noted in the haddocks.

Regards,
     Malcolm



More information about the Glasgow-haskell-users mailing list