When the Hourly Fare rate is noted as 30 + max(0, Speed - 12) that's missing the 2.50 multipler right? Really it should be Hourly Rate = 30 + (2.50 * max(0, Speed - 12)).
Or if you prefer Lispy stuff :)
(+ 30 (* 2.5 (max (0 (- speed 12)))))
This then means if you drive at 22mph for 1 hour, you earn 30 + (2.50 * max(0, 10)) or $55 which you also get from 2.50 * 22
Is this just discounting the constant multiplier since it applies to everything and can be pulled out?
Or if you prefer Lispy stuff :)
(+ 30 (* 2.5 (max (0 (- speed 12)))))
This then means if you drive at 22mph for 1 hour, you earn 30 + (2.50 * max(0, 10)) or $55 which you also get from 2.50 * 22
Is this just discounting the constant multiplier since it applies to everything and can be pulled out?