intersect?

check if given sets intersect (they have at least one common element)


Parameters

intersect? setA :block
           setB :block

Returns

  • :logical

Examples

copy
intersect? @1..10 @8..12 ; => true intersect? ["one" "two" "three"] ["three" "four" "five"] ; => true intersect? ["one" "two" "three"] ["four" "five" "six"] ; => false

Related