quickutil
quickutil copied to clipboard
Add RANDOM-FROM and BISECT
This adds two functions:
-
BISECT
: returns the position in an ordered list where element should be inserted while preserving order -
RANDOM-FROM
: returns a number of samples from the provided list using weights if provided, otherwise each choice is equally likely. Depends onBISECT
.
Looking for feedback and improvements.