Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add special grouping functions #255

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Commits on Apr 23, 2022

  1. Add special grouping functions

    Problem: it is an often need to have a function of
    `[(a, b)] -> [(a, [b])]` signature that would group elements by the
    first element of the pair, and return the element we grouped by and the
    associated second elements of the pairs.
    
    Solution: add this function, and a more generic one that does not
    necessarily work with pairs.
    
    Also, we in-parallel work on making `group` function return `NonEmpty`,
    not lists, so I implement it via `NonEmpty` here too.
    
    Special thanks to @treeowl for providing elaborate implementations and
    advanced variations for special cases.
    Martoon-00 committed Apr 23, 2022
    Configuration menu
    Copy the full SHA
    6a3b987 View commit details
    Browse the repository at this point in the history

Commits on May 20, 2022

  1. Configuration menu
    Copy the full SHA
    383bf54 View commit details
    Browse the repository at this point in the history

Commits on Jun 22, 2022

  1. Configuration menu
    Copy the full SHA
    63266fa View commit details
    Browse the repository at this point in the history
  2. Add groupOn

    Problem: previously we added `groupByKeyOn`, and generally we decided
    that adding `*On` versions of functions would be convenient.
    
    Solution: add `groupOn` for consistency.
    Martoon-00 committed Jun 22, 2022
    Configuration menu
    Copy the full SHA
    084e3e7 View commit details
    Browse the repository at this point in the history