Random number generation seems to be an often used example of where functional programming falls down. The argument is that you need the random number generator to return a new result every time you call it. To do that, it either needs internal state (so it is not pure) or the current state must be carefully threaded through the entire program. Passing that state in and out of every function is clearly going to ruin your beautiful design. James Hague, who I greatly respect, lists this as one of the reasons that functional programming doesn't work. I hope to convince you that everyone has been doing random number generation wrong, and a more functional approach to it would benefit old fashioned imperative programmers too.
A couple of years ago, I had an idea for planning paths for wheeled robotic vehicles. Self driving car type vehicles with normal steering (non-holonomic). I thought a cheap heuristic which guides the search around obstacles but still underestimates would make it possible to find paths which were close to optimal in reasonable time. I got as far as writing a test app for it, and it seemed to work exceptionally well, so I did what anyone would do in that situation; I left it stagnating on my various hard drives. It could be useful in robotics or game development.
David Olsen
Software Engineer at Google Australia