Generate a function from source.

An attempt at any sort of fiddle to get the ball rolling.

Closes #41.