![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Simulation of other Paradigms and Continuations - slide 17 : 43 |
Imperative | Functional - Scheme |
int gcd(int small, int large){ int rem; while (small > 0){ rem = large % small; large = small; small = rem; } return large; } | (define (gcd small large) (if (> small 0) (gcd (remainder large small) small) large)) |