
17 Mar
2008
17 Mar
'08
6:30 a.m.
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.