previous up contents next
Left: And Up: Standard library function functions Right: Equal

Or

Or maps a path prefix consisting exclusively of ones and zeroes to 1 if it contains at least one 1, and to 0 otherwise. The rest of the path is returned unchanged.

    Or:
        <>  == 0 Idem
        <1> == 1 Strip:<>
        <0> == Or:<>.
    
    Or:<1 0 0 1 0> = 1.
    Or:<0 0 0 0 0> = 0.
    Or:<1 1 0 1 1 foo 0> = 1 foo 0.

See the discussion of And, above, for the rationale for this semantics.


---------------------------------------------------------

Copyright © Roger Evans, Gerald Gazdar & Bill Keller, Tuesday 10 November 1998