A function to handle multiple datatypes

And I'll guess that the memory consumption also depends on how complicated (or big) the function body is. sendAnything() was trivial. If the function's body is bigger then the overhead in the template alternative starts to pile up sooner.