# Reference/prior

From Kx Wiki

## prior (prior function)

Apply the function f between each item of y and its predecessor.

Since 2.7 2011.03.07

## Syntax

f prior y

## Examples

q)(-)prior 2 3 4 / e.g. same as deltas 2 3 4 2 1 1