Take a view of v from the second index to it’s last index, and then from that, do a (broadcasted) subtraction with a view from the first index to the second last index
In a handful of tests I did, this appears to perform just as well or better than the version from base, and is in some ways ‘smarter’ because it takes advantage of range types naturally to avoid unnecessary work:
WOW! I missed this one BIG time! sorry about that. Thanks for the solution. I just went to docs and typed in “diff” and it was the first answer. MAKE IT STOP!! thanks again
ALSO @Mason thanks for taking the time to give me some more thinking to do. I am STILL having difficulties with many of the julia concepts and great examples like this are really helpful