or? ( obj1 obj2 -- obj2/obj1 second? )


Vocabulary
kernel

Inputs
obj1a generalized boolean
obj2a generalized boolean


Outputs
obj2/obj1a generalized boolean
second?boolean


Word description
A version of or which prefers to return second argument instead of the first. The output second? tells you which object was returned.

Examples
Prefers the second argument:
USING: arrays kernel prettyprint ; f 3 or? 2array .
{ 3 t }

Will also return the first:
USING: arrays kernel prettyprint ; 3 f or? 2array .
{ 3 f }

Can return false:
USING: arrays kernel prettyprint ; f f or? 2array .
{ f f }


See also
or, or*

Definition

: or? ( obj1 obj2 -- obj2/obj1 second? ) [ nip t ] [ f ] if*
; inline