Ability to define function templates

Recently I had a similar question: Classification of functions.

Something like “protocols” in Objective-C would be a great thing.
Perhaps add it to the whishlist?