I am trying to use the truncate function in scheme and DrRacket keeps issuing this message
ProblemA.rkt:27:46: truncate: this function is not defined in: truncate
Is there an import or something I can add so the compiler can find the library for truncate?
Basically I want to do integer division in scheme so 98/10 = 9 instead of 9.8 but the truncate function isn’t working.
(quotient 98 10)does what you want.i am actually a big fan of the “division returns float” behavior. the integers are not closed under division (in theory). and
1/2 == 0can introduce subtle bugs (in practice). i always “from __future__ import division” in python too.