Bloccs.Effects.Random behaviour (bloccs v0.2.0)

Copy Markdown View Source

Random effect facade + backend behaviour. Nodes call Bloccs.Effects.Random.int/2 against ctx.effects.random.

Summary

Functions

A random integer in 1..n through the bound RNG backend.

Types

cap()

@type cap() :: struct()

Callbacks

int(cap, pos_integer)

@callback int(cap(), pos_integer()) :: pos_integer()

new(term)

@callback new(term()) :: cap()

Functions

int(cap, n)

@spec int(cap(), pos_integer()) :: pos_integer()

A random integer in 1..n through the bound RNG backend.