2unless ( ..a x y pred: ( ..a x y -- ..b ? ) false: ( ..b x y -- ..b x y ) -- ..b x y )


Vocabulary
kernel

Inputs
xan object
yan object
preda quotation
falsea quotation


Outputs
xan object
yan object


Word description
A variant of unless that takes a pred quotation. Calls 2check on the pred quotation to return a boolean and preserves x and y for both branches. The false branch is called conditionally.

See also
1if, 1when, 1unless, 2if, 2when, 3if, 3when, 3unless

Definition

: 2unless
( ..a x y pred: ( ..a x y -- ..b ? ) false: ( ..b x y -- ..b x y ) -- ..b x y )
[ ] swap 2if ; inline