Skip to content

Instantly share code, notes, and snippets.

@amitaibu
Created February 25, 2022 09:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amitaibu/30b34d65066de9e545d74ee66891100b to your computer and use it in GitHub Desktop.
Save amitaibu/30b34d65066de9e545d74ee66891100b to your computer and use it in GitHub Desktop.

I'd like to convert the List (List Int) to a Tree, where it will group similar items together.

So imagine the following:

[
  [ 1 , 2, 3, 4]
  [ 1 , 2, 5, 6]
  [ 1 , 2, 3, 7]
]

I'd like to get a tree that looks like this:

Selection_999(738)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment