fix docstrings

Hello, this is a small PR to fix some misplaced docstrings.  They go before the argument vector, which is unlike many other languages such as Python.  I have made the same mistake myself.

An aside: Thanks for sharing this code, I found it pretty interesting and illustrative.