Hi all, Is it possible to define a limit for the size of children list bellow?
I've tried: children <- resize (10 (listGen featureGenNormal)) But it didn't work. Thanks a lot, Rodrigo. > Sebastian Sylvan: > >> featureGenNormal = do > >> id <- stringGen > >> name <- stringGen > >> featuretype <- arbitrary > >> grouptype <- arbitrary > >> children <- arbitrary > >> properties <- listGen stringGen > >> return (Feature id name featuretype grouptype children properties) > > Ryan Ingram wrote: > > Also, you can shorten this significantly with liftM or ap (from > > Control.Monad): > > True, but in this case I like being able to see meaningful > names for each parameter of the constructor. > ----------------------------------- Rodrigo Bonifácio de Almeida Universidade Católica de Brasília - Grupo de Engenharia de Software - JavaComBr (www.ucb.br/java) _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe