2 ms·
As a point of comparison, consider an idiomatic approach in the vector-oriented language K. Given a vector t: t:199 200 208 210 200 207 240 269 260 263 Th
by RodgerTheGreat 4y ago
As a point of comparison, consider an idiomatic approach in the vector-oriented language K. Given a vector t:
t:199 200 208 210 200 207 240 269 260 263
The "eachprior" adverb ': captures the pattern of applying each value in a sequence to its predecessor through a verb (in this case >), giving a boolean vector:
>':t
0 1 1 1 0 1 1 1 0 1
Then take a sum reduction:
+/>':t
7
Seems like the same decomposition would be quite easy with beginner-level Excel, provided an extra "working" column.