templates are just functions

I was wondering what a template would look like, and the simplest thing one can do is just implement them as functions that take some arguments and put them in the right spots in a document tree. I added an example of that as a test.