> Since this is impossible in imperative languages, I can't give you a comparison.
I'll bite. Here's foldr() in JavaScript, written in an imperative style:
function foldr(func, list) {
var r = [];
for(var index = list.length-1; index >= 0; index--) {
r = func(list[index], r);
}
return r;
}
It isn't defined via pattern matching, but it's absolutely a higher-order function. Functional programming is a collection of ways of thinking about problem solving, and it can be applied to any language.