Question: John McCarthy is a famous computer scientist who designed LISP. He once proposed a function called the McCarthy 91 function, defined as follows: Mac(n) =
John McCarthy is a famous computer scientist who designed LISP. He once proposed a function called the McCarthy 91 function, defined as follows:
Mac(n) = ( n 10 if n > 100 Mac(Mac(n + 11)) if n 100
Write this function in Scheme. Try calling the function with a few numbers less than 100 and see what the results are.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
