each prior

From The K Language Wiki
Revision as of 06:10, 27 July 2021 by Razetime (talk | contribs) (add eachprior)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Each prior
f':x
x f':y

Each prior applies a two argument function(dyad) to each element, and the element prior to it.

If provided with a left argument, uses it as an initial value.

 +':1 2 3 4 5
1 3 5 7 9

 5+':1 2 3 4 5
6 3 5 7 9