set-equalGBBopen Toolsshuffle-listsets-overlap-pGoTo Top

sets-overlap-p   list-1 list-2 &key test test-not key => boolean[Function]

Purpose
Determine if any element in list-1 appears in list-2.

Package   :gbbopen-tools

Module   :gbbopen-tools

Arguments and values

list-1     A proper list
list-2     A proper list
test     A function designator specifying a function object of two arguments that returns a generalized boolean (default is #'eql)
test-not     A function designator specifying a function object of two arguments that returns a generalized boolean (use of :test-not is deprecated)
key     A function designator specifying a function object of one argument, or nil (default is nil)
boolean     A generalized boolean

Returns
True if any element in list-1 is also in list-2; nil otherwise.

Description
Duplicate elements in either list are permitted.

Examples

  > (sets-overlap-p '(1 2 3) '(3 4 5))
  t
  > (sets-overlap-p '(1 2) '(3 4 5))
  nil
  > (sets-overlap-p '(1 3 7) '(3 4 5 6) :test #'/=)
  t
  >


The GBBopen Project


set-equalGBBopen Toolsshuffle-listsets-overlap-pGoTo Top