Define functions in module metaprogrammically

Thank you. Someone just posted this as an answer on my SO question as well.

http://stackoverflow.com/a/40250462/1533054