After some help last week on this forum, I generate 2 lists, put them together and shuffle them.
-- adult German males and females with random heights
fs :: State StdGen [Float]
fs = replicateM depth $ state $ normal' (166,6)
ms :: State StdGen [Float]
ms = replicateM depth $ state $ normal' (179,6)
-- heights
hs :: State StdGen [Float]
hs = join $ (\ ms fs -> shuffle $ ms ++ fs) <$> ms <*> fs
Is there a way to avoid replicating with a specific depth
for each list, but take put them together and then do a take
with a specific length, i.e.:
take depth hs
without referring to depth in ms
& fs
.