Version 3 of intersect3

Updated 2007-11-07 19:14:19 by glennj

Procedure to perform set differences between two lists. It returns a list of three lists: the first element returned is everything in the first list that isn't in the second list; the second element returned is the intersection of the two lists; the third element returned is everything in the second list that isn't in the first list. The returned lists will be sorted.

Usage:

  intersect3 lista listb

Example:

  package require Tclx
  intersect3 {a b c d e} {d e d f g c} ;# ==> {a b} {c d e} {f g}

This functionality exists in tcllib in the struct::set namespace [L1 ]


Category Command, part of Tclx