IdrisDoc: Effect.Random

# Effect.Random

RND : EFFECT
data Random : Effect
  GetRandom : sig Random Integer Integer
  SetSeed : Integer -> sig Random () Integer
rndFin : (k : Nat) -> Eff (Fin (S k)) [RND]

  Generate a random number in Fin (S `k`)

  Note that rndFin k takes values 0, 1, ..., k.

rndInt : Integer -> Integer -> Eff Integer [RND]

  Generates a random Integer in a given range

rndSelect : List a -> Eff (Maybe a) [RND]

  Select a random element from a list, or Nothing if the list is empty

rndSelect' : Vect (S k) a -> Eff a [RND]

  Select a random element from a vector

srand : Integer -> Eff () [RND]

  Sets the random seed