Written in C++, this function should always run faster than
diff for calculating differences between adjacent values
of an integer vector.
1 2 3 4
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.