The docstring of compact states that result will be "sorted ascendingly according to values", but it seems like there is a sortOn (Down . snd) in the code that causes the result to actually be sorted in descending order of probability.
|
compact = sortOn (Down . snd) . Map.toAscList . Map.fromListWith (+) |
The docstring of
compactstates that result will be "sorted ascendingly according to values", but it seems like there is asortOn (Down . snd)in the code that causes the result to actually be sorted in descending order of probability.monad-bayes/src/Control/Monad/Bayes/Enumerator.hs
Line 94 in 14faeb7