stylewarning / quickutil

The solution to the Utility Library problem.
87 stars 8 forks source link

Add RANDOM-FROM and BISECT #61

Open notmgsk opened 6 years ago

notmgsk commented 6 years ago

This adds two functions:

  1. BISECT: returns the position in an ordered list where element should be inserted while preserving order
  2. RANDOM-FROM: returns a number of samples from the provided list using weights if provided, otherwise each choice is equally likely. Depends on BISECT.

Looking for feedback and improvements.