anchor.diff:  
   -opaque(state). %% Implementation state
   
  +-opaque(alg_seed).  %% Algorithm dependent state
  +
   %% This depends on the algorithm handler function
  --type alg_state() :: any().
  +-type alg_seed() :: any().
   %% This is the algorithm handler function within this module
   -type alg_handler() :: #alg{}.
   %% Internal state
  --type state() :: {alg_handler(), alg_state()}.
  +-type state() :: {alg_handler(), alg_seed()}.
   
   -type alg() :: as183 | exs64 | exsplus | exs1024 | sfmt | tinymt.
   
  
positive.code: %% NOTE: this module will replace OTP random module
  -module(random).
  
  -export([seed/0, seed/1, seed/2, seed/3, seed0/0, seed0/1,
           uniform/0, uniform/1, uniform_s/1, uniform_s/2]).
  
  -export([get_algorithm/0, get_algorithm/1]).
  
  -define(DEFAULT_ALG_HANDLER, as183).
  -define(SEED_DICT, random_seed).
  
negative.code: %% API
  %% =====================================================================
  
  %% Return algorithm and seed so that RNG state can be recreated with make_seed/1
  -spec export_seed() -> undefined | {alg(), alg_seed()}.
  
  export_seed() ->
      case seed_get() of
  	{#alg{type=Alg}, Seed} -> {Alg, Seed};
  	_ -> undefined
      end.
  
  -spec export_seed(state()) -> {alg(), alg_seed()}.
  
  export_seed({#alg{type=Alg}, Seed}) -> {Alg, Seed}.
  
  %%% Note: if a process calls uniform/0 or uniform/1 without setting a seed first,
  %%%       seed/0 is called automatically.
  