IdrisDoc: Effect.Random

# Effect.Random

srand : Integer -> Eff () [RND]

  Sets the random seed

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

  Select a random element from a vector

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

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

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

  Generates a random Integer in a given range

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.

data Random : Effect
  GetRandom : sig Random Integer Integer
  SetSeed : Integer -> sig Random () Integer
RND : EFFECT