Skip to main content

Jason Axelson

axelson

Generate a unique positive integer

Generates an increasing integer, that is unique to this BEAM instance.
iex> System.unique_integer([:positive, :monotonic])
1
iex> System.unique_integer([:positive, :monotonic])
2
iex> System.unique_integer([:positive, :monotonic])
3
15 upvotes

© 2021 Zest Creative, LLC