interface Random : Type -> Type
- Parameters: a
Methods:
randomIO : HasIO io => io a
randomRIO : HasIO io => (a, a) -> io a
Takes a range (lo, hi), and returns a random value uniformly
distributed in the closed interval [lo, hi]. It is unspecified what
happens if lo > hi.
Implementations:
Random Int32
Random Double
randomIO : Random a => HasIO io => io a
- Visibility: public export
randomRIO : Random a => HasIO io => (a, a) -> io a
Takes a range (lo, hi), and returns a random value uniformly
distributed in the closed interval [lo, hi]. It is unspecified what
happens if lo > hi.
Visibility: public exportsrand : Bits64 -> IO ()
Sets the random seed
Visibility: exportrndFin : HasIO io => (n : Nat) -> io (Fin (S n))
Generate a random number in Fin (S `k`)
Note that rndFin k takes values 0, 1, ..., k.
Visibility: public exportrndSelect' : HasIO io => Vect (S k) a -> io a
Select a random element from a vector
Visibility: public exportrndSelect : HasIO io => (elems : List a) -> {auto 0 _ : NonEmpty elems} -> io a
Select a random element from a non-empty list
Visibility: public export