I don't remember how long it took me to do the spell checker challenge:
https://github.com/dlang/dmd/blob/master/src/dmd/root/spelle...
but I'm sure it was much longer than it took Peter. This checker is used by the D compiler to look for a misspelled identifier when a symbol lookup fails. The identifiers in scope form the dictionary.
It works surprisingly well. I added it to the Digital Mars C++ compiler as well.
https://github.com/DigitalMars/Compiler/blob/master/dm/src/d...