module Rando ( pickOne ) where import System.Random.TF.Init import System.Random.TF.Instances pickOne :: [x] -> IO x pickOne l = do g <- newTFGen let (ix, _) = randomR (0, (length::[a]->Int) l - 1) g pure $ l !! ix