I am trying to name what I think is a new idea for a higher-order function. To the important part, here is the code in Python and Haskell to demonstrate the concept, which will
in C++ Standard Template Library, it is called adjacent_difference (though the operator can be any operation, not just subtraction)