prototyping def macros, fleshing out the API

review @densh