HF RL Explorer

income tax: fix bug

income tax: fix bug: a task in smol-software-harbor (Harbor dataset). Tax.due in lib/tax.rb taxes the whole income at the rate of its highest bracket, instead of applying each rate only to the slice of income inside that bracket (as the comment says). For example 20 000 must pay 2 000, not 4 000…

The task

`Tax.due` in `lib/tax.rb` taxes the whole income at the rate of its highest bracket, instead of applying each rate only to the slice of income inside that bracket (as the comment says). For example 20 000 must pay 2 000, not 4 000. Fix it and run the tests with `for f in test/*_test.rb; do ruby -Ilib "$f"; done`.

Part of efederici/smol-software-harbor.