Using the result of Homework 13 and after implmenting modulus here, you should be able to take those and write a fact for the greatest common divisor. I would recommending reading the Wikipedia article about using Euclid’s method for finding the GCD of two numbers. The link can be found here. Post in the comments if you have any questions.

(fact (gcd ***YOUR CODE HERE*** ))


(query (gcd (1 1 1 1) (1 1) ?what))
; expect Success! ; what: (1 1)

I don't claim to be perfect so if you find an error on this page, please send me an email preferably with a link to this page so that I know what I need to fix!

comments powered by Disqus