Tag Archives: ml

Euclidean Algorithm

One of my favorite algorithms is the simple, elegant Euclidean algorithm for finding the greatest common denominator of two numbers. In ML or another functional language it really is beautiful:

Recursive Fibonacci

Here are two recursive fibonacci functions in ML I did for CS243. Can you tell which one is more efficient?