View Source ow_util (overworld v2.0.0)

Summary

Functions

-spec any_in_list(list(), list()) -> list().
-spec mapfind(term(), term(), list()) -> term() | false.
-spec maplistsort(term(), list()) -> list().
Link to this function

mapstore(Key, Val, L, Map)

View Source
-spec mapstore(term(), term(), list(), map()) -> [map()].
-spec pipeline(any(), list()) -> any().
-spec remove_dups(list()) -> list().
-spec run_bchecks(list()) -> ok | any().
-spec run_checks(list()) -> ok | any().
-spec take_random(list()) -> list().

This function will take a list of items and return a random element Alternatively an integer number of items may be specified

-spec take_random(list(), pos_integer()) -> list().
-spec weighted_random([{term(), integer()}]) -> [term()].