ExHashRing.Utils (ex_hash_ring v6.0.4) View Source

Utility functions used throughout ExHashRing

Link to this section Summary

Functions

Take up to maximum items from a list.

Link to this section Functions

Specs

take_max(list :: [item], maximum :: non_neg_integer()) ::
  {list :: [item], count :: non_neg_integer()}
when item: term()

Take up to maximum items from a list.

This function returns the items in reverse order and with a count of how many items were found.