which of course does not compile. (There's also the issue
that in order to really do higher-order functions with prototypes, I'd need to somehow examine fn's prototype and preserve it in the returned sub.)
I'm thinking that a source filter might help, turning builtins used as values into anonymous subs, but I don't know very much about source filters — I'm not even
sure that they do what I think they do.
Yours in pedantry,
"Anything you put in comments is not tested and easily goes out of date." -- tye
How would prototypes help? All that does is allow for some syntactic sugar. It doesn't deal with the problems FoxtrotUniform mentioned. In addition, Perl5 doesn't really have solid support for lists, and arrays are not lists. Perl6 will deal with it better, by allowing you to pass lists to a function, but Perl5 requires you to deal with array references, which is just another hack.
Being right, does not endow the right to be rude; politeness costs nothing. Being unknowing, is not the same as being stupid. Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence. Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.