Oh yes, choose is great. I've used that.
d1 $ s "rave2*8" # n (choose [1, 2, 3]) # cut "1"
Your solution here is great. Thank you so much. Very useful and superFunzees to mess around w/:
d1 $ s "rave2*8" # n (choose $ concat $ zipWith replicate [1, 2, 3] [1, 2, 3]) # cut "1"
Much more elegant than my clunky workaround that I've been using up until now:
d1 $ s "rave2*8" # n (choose [1, 2, 2, 3, 3, 3]) # cut "1"
Less chars and easy to read w/ that particular example but possibly infinitely more amount of chars and definitely harder to read with very large arrays.
This bit went over my head. It looks cool though:
let randperm t xs = pxs !! (floor $ timeToRand t * (fromIntegral $ length pxs)) where pxs = permutations xs
I got it to evaluate ok and I can also run randperm 0 ["a", "b", "c"]
ok. But that last bit about turning the list into a pattern I would love to be able to do on my own but sadly I lack the experience w/ Haskell.
I tried looking up mentions of listtoPat in Learn you a Haskell.
I found some mentions of it here: https://hackage.haskell.org/package/tidal-0.2/src/Pattern.hs
I dunno, could @bgold or someone else maybe help me out some more?
for posterity... referencing my partial answer on Twitter, but I don't think it fully answers your question: https://twitter.com/kindohm/status/763379269070262272
Can bgold's answer be accepted?