Question: I should have a function in Standard ML language bites : int -> int * int such that for any natural number n, bites n
I should have a function in Standard ML language
bites : int -> int * int
such that for any natural number n, bites n computes a pair (x,y): x + y = n and x = y or x = y + 1. That is, x should be n/2 rounded up and y should be n/2 rounded down. These pairs should be computed by recursion, so only the use of addition and subtraction of numerals is allowed.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
