Functional Weave
Code in TypeScript

money.allocate@1.0.0

README.md

314 bytes · view raw

# money.allocate

Splitting 10.00 three ways gives 3.34, 3.33, 3.33 - never 3.33 three times with
a penny quietly lost, and never 3.34 three times with a penny invented.

The leftover is distributed by largest remainder, ties broken by position, so
the same input always produces the same split in every language.