ldifference

ldifference (list) (list1 …)
returns list differnce.

proc ldifference {l args} {
  if {[llength $args] > 0} then {
    set args [lassign $args m]
    set result {}
    foreach el $l {
      if {$el ni $m} then {
        lappend result $el
      }
    }
    ldifference $result {*}$args
  } else {
    set l
  }
}

© Wolf-Dieter Busch | Home | Sitemap | Urheber | A-Z