sonic-pi

https://github.com/sonic-pi-net/sonic-pi

C++

Code. Music. Live.

Hamster::List#merge_by

Merge all the nested lists into a single list, using sort keys generated
by mapping the items in the nested lists through the given block to determine the
order which items should be shifted out of the nested lists and into the output
list. Whichever nested list's `#head` has the "lowest" sort key (according to
their natural order) will be the first in the merged `List`.

Source | Google | Stack overflow

Edit

git clone [email protected]:sonic-pi-net/sonic-pi.git

cd sonic-pi

open app/server/ruby/vendor/hamster-3.0.0/lib/hamster/list.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Hamster--List-merge_by-for-pr


# Commit to git

git add app/server/ruby/vendor/hamster-3.0.0/lib/hamster/list.rbgit commit -m "better docs for Hamster::List#merge_by"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Hamster--List-merge_by-for-pr

hub pull-request


# Celebrate!