Random for Elixir.
Elixir
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
test
.gitignore
.travis.yml
README.md
mix.exs

README.md

Random module for Elixir

Build Status

A Elixir wrapper for the random module of Erlang.

This is not cryptographically strong as the random module of Erlang.

Examples

iex> Random.random
0.44358461744572030838
iex> Random.random(3)
1
iex> Random.sample([1,2,3])
2
iex> Random.sample([1,2,3], 2)
[3,1]
iex> Random.shuffle([1,2,3])
[2,1,3]