[Haskell-beginners] generating the set of all finite-valued ...

Chaddaï Fouché chaddai.fouche at gmail.com
Tue Apr 28 03:26:18 EDT 2009


On Fri, Apr 24, 2009 at 6:20 PM, Erik Quaeghebeur
<equaeghe at nospammail.net> wrote:
> Yes, now I see it, thanks to both Jan and Brent.
> I can nicely generalize this to
>
>        n = ...
>        values = [...]
>        sequence (replicate n values)
>

(sequence (replicate n xs)) is part of Control.Monad under the name
replicateM so :

> replicateM n values

-- 
Jedaï


More information about the Beginners mailing list