Ability to define function templates

See also https://github.com/JuliaLang/julia/issues/210, a rather long-standing issue! We don’t have this feature yet, but it’s interesting to think about how it might work.

Also, as a minor aside, in typical terminology this is not called a template, but a function type or arrow type.