REBOL Programming/outside?

From Wikibooks, open books for an open world
< REBOL Programming
Jump to: navigation, search

USAGE:[edit]

OUTSIDE? p1 p2 

DESCRIPTION:[edit]

TRUE if either X and Y of the second pair are greater than the first.

OUTSIDE? is a function value.

ARGUMENTS:[edit]

  • p1 -- (Type: pair)
  • p2 -- (Type: pair)

SOURCE CODE[edit]

outside?: func [
    {TRUE if either X and Y of the second pair are greater than the first.} 
    p1 [pair!] 
    p2 [pair!]
][
    found? any [p2/x > p1/x p2/y > p1/y]
]