Skip to content

compact function sorts by probability #353

Open
@gaurav-arya

Description

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 (+)

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions