urn-random (hackage): This package implements urns, which are a simple tree-based data structure that supports sampling from and updating discrete probability distributions in logarithmic time.  The details are presented in the paper “Ode on a Random Urn (Functional Pearl)”, by Leonidas Lampropoulos, Antal Spector-Zabusky, and Kenneth Foner, published in Haskell Symposium ’17.
Keywords: data|library|mit