MonadRandom
MonadRandom copied to clipboard
`weighted` does not complain about negative weights
If I do
weighted [(1,-1), (2, -2)]
Sometimes it will give a mysterious error head: empty list
. It should say that negative weights are not allowed instead.
Hi @luqui , which version of MonadRandom
are you using? This got improved in the most recent 0.5.1.2 release, see https://github.com/byorgey/MonadRandom/issues/44 . I'm open to suggestions for further improvement.