most ( x y quot -- z ) (original) (raw)

most ( x y quot -- z )

Vocabulary
kernel

Inputs

x an object
y an object
quot a quotation with stack effect ( x y -- ? )

Outputs

z either x or y

Word description
If the quotation yields a true value when applied to x and y, outputs x, otherwise outputs y.

Definition

IN: kernel

: most ( x y quot -- z ) 2keep ? ; inline