Robert and I have gone around on this issue before too.
Where I'm coming from as a Silicon Forest type exec, is from a need to break away from the stereotype view that algorithms / functions / processes are exclusively or even primarily about number types.
All your examples are somewhat confined to the integers and reals as domain / range, whereas in the real world we work in, a function is a kind of callable object that munches on string literals just as likely, or on other kinds of objects, such as picture files or movies. These are domain objects just as surely and work is getting done, outputs obtained. The "function" concept deserves to persist outside the narrow K-12 channel.
Why is the K-12 channel so narrow when it comes to what "function" might mean, in choosing only number types for domains? 'Godel, Escher, Bach' came out quite a long time ago by now, and typified the drift towards a more lexical kind of argument associated with DNA sequencing, pattern matching, text more generally.
Why are ASCII and Unicode not treated much in K-12, except in some computer science elective for the better endowed? Why isn't there a digital math track for students who want to indulge their interest in digital technologies while winning math credit at the same time? No good / reasonable answer to either question. We're dealing with a backward civilization pure and simple, a fact any student might tune in at any point in his / her career -- but we hope sooner rather than later, in the interests of saving time (theirs as much as ours).
So maybe throw in some functions that add "ed" to a string, e.g. f("talk") --> "talked"; f("peak") --> "peaked" and so on. Yes, you might link this to grammar and a discussion of exceptions to rules. The phrase "the exception that proves the rule" is pretty deep by the way. The philosophers of mathematics I yak with, groomed in Wittgensteinian stables, tend to think rather purely in terms of rules and exceptions, when it comes to thinking / language more generally.
Finally, back to number crunching functions, which I'm not saying should go away, I'm always looking for lesson plans that (a) relate 1st 2nd and 3rd powering to linear, areal and volumetric grown (of the same shape, ideally) and (b) do not *necessarily* link 3rd powering to a cube, 2nd powering to a square. It's (b) that's uncommon, though it's always surprising how little we see of (a). (b) relates to that meme re the Pythagorean Theorem, well-developed in Portland's Geek Hogwarts, Winterhaven PPS: the shapes you erect on the two legs and hypotenuse such that the sum of the two equals the third, do not have to be square shapes.
I'm talking bio and nano technology at this point. You know there's a magazine named 'Tetrahedron' right? What we discovered in the golden age of ocular microscopy is that the Platonic forms, far from being only in some Ideal Realm, are at the ultra-small frequencies, in the form of crystals and microbes. At even smaller scales, the geometry resolves to where you want students more adept at thinking CCP / HCP than the current crop. XYZ thinking, so rectilinear, so orthodox, so wrong, so insecure, still needs to be chipped away at. We do that every chance we get, in various pilots around town. No wonder Portland's so weird right?
So along this Digital Track, expected to run all four years eventually, you'll encounter Regular Expressions, the J language, and invitations to share your posters at a Pycon. Facebook and Twitter live here. We know about MongoDB, Cassandra, Voldemort, JQuery, SQL, GNU, Rails, Django, Drop Box, Spotify, Google, Silicon Valley, Wiki, LAMP... Redmond, Bangalore, Prineville. All that stuff you might hear about when geeks talk, but what for some reason never seems to gain much traction in most TeacherVilles (picture many encampments).