Each prior: Difference between revisions

From The K Language Wiki
Content added Content deleted
(add johne difference suggestion)
mNo edit summary
Line 1: Line 1:
{{primitive|f':x<br>x f':y}}
{{primitive|f':x<br>x f':y}}


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


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

Revision as of 08:39, 31 July 2021

Each prior
f':x
x f':y

Each prior applies a dyadic function to each element, and the element prior to it.

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

 -':1 6 2 3 4
1 5 -4 1 1

 5-':1 6 2 3 4
-4 5 -4 1 1