After reading the “coconut” problem over on my friend’s blog, I thought it would be fun to solve it with a silly brute force approach. First, go read his post and then come back here. let take n = let m = n – 1 // give one to the monkey if m…

# Month: December 2009

## Towers of Hanoi

A friend of mine is starting a pretty fun looking math blog. His first post is on Towers of Hanoi. I’m sure he’ll tackle it with some slick mathematics, but my usual M.O. is to convert everything to code. I remember this “Hello Recursive World” from SICP in Scheme; looks better in F#: let rec hanoi…