Copyright | Copyright (C) 2023 Yoo Chung |
---|---|
License | GPL-3.0-or-later |
Maintainer | dev@chungyc.org |
Safe Haskell | Safe-Inferred |
Language | GHC2021 |
Some solutions to Problems.P23 of Ninety-Nine Haskell Problems.
Synopsis
- randomSelect :: RandomGen g => [a] -> Int -> g -> ([a], g)
Documentation
randomSelect :: RandomGen g => [a] -> Int -> g -> ([a], g) Source #
Extract a given number of randomly selected elements from a list.
Also return a new random number generator so that callers can avoid reusing a sequence of random numbers.