Review request

I started this and jokingly tried to port Norvig's Python code directly (hence the awful maps/reduces in place of the list comprehensions). I'd like to now make this more readable.

All feedback welcome.