Version 0 of SetOps, Emptiness

Updated 1999-03-24 15:46:14

Purpose: Definition and discussion of set functionality, especially the function to check a set for emptiness.


::setops::empty set


Arguments:

  • Exactly one argument.
  • The argument represents the set to check.
  • The set is given by value, as tcl-list.

Result:

  • A boolean value. 0 = set is not empty, 1 = set is empty

Implementation:

 proc ::setops::empty {set} {
    expr {[llength $set] == 0}
 }

-- AK