Bosatsu/Rand

public dependencies: Bosatsu/Num/Nat

Index

Types

Rand[a]

type Rand[a: +*]

Values

bool_Rand

bool_Rand: Rand[Bool]

const_Rand

def const_Rand[a](a: a) -> Rand[a]

flat_map_Rand

def flat_map_Rand[a, b](r: Rand[a], fn: a -> Rand[b]) -> Rand[b]

from_pair

def from_pair[a](left: Rand[a], right: Rand[a]) -> Rand[a]

geometric_Int

geometric distribution with mean 1

geometric_Int: Rand[Int]

int_range

if you pass high <= 0, you get const_Rand(0)

def int_range(high: Int) -> Rand[Int]

map_Rand

def map_Rand[a, b](r: Rand[a], fn: a -> b) -> Rand[b]

nat_range

def nat_range(high: Bosatsu/Num/Nat::Nat) -> Rand[Bosatsu/Num/Nat::Nat]

one_of

def one_of[a](head: Rand[a], tail: List[Rand[a]]) -> Rand[a]

prod_Rand

def prod_Rand[a, b](ra: Rand[a], rb: Rand[b]) -> Rand[(a, b)]

run_Rand

def run_Rand[a](rand: Rand[a], seed: Int) -> a

sequence_Rand

def sequence_Rand[a](rands: List[Rand[a]]) -> Rand[List[a]]
The source code for this page can be found here.