Tk Library Source Code

View Ticket
Login
Ticket UUID: 776010
Title: Add set operations.
Type: RFE Version: None
Submitter: cleverly Created on: 2003-07-23 02:18:45
Subsystem: struct :: list Assigned To: andreas_kupries
Priority: 8 Severity:
Status: Closed Last Modified: 2004-02-04 12:47:57
Resolution: Closed By: andreas_kupries
    Closed on: 2004-02-04 05:47:57
Description:
Date: 22 Jul 2003 17:46:51 GMT
From: [email protected]
Newsgroups: comp.lang.tcl
Subject: Re: common elements in list of list


According to Michael A. Cleverly <[email protected]>:
:On 22 Jul 2003, Sasi wrote:
:
:>        How can get the list of common elements in
the list of list? eg:
:> set x {
:>        {1 2 3 4 5 6}
:>        {6 7 8 9 5 1}
:>        {1 2 7 5 8 9}
:>       }
:>
:> the common elements in this list of list are 1 & 5
:> is there any easy way to extract them?
:
:Here's a solution off the top of my head:

Michael, would you consider possibly adding this
solution, or a derivation, to the struct::list module
of tcllib?
User Comments: andreas_kupries added on 2004-02-04 12:47:57:
Logged In: YES 
user_id=75003

Basic set operations added to CVS head, module 'struct'.

andreas_kupries added on 2003-08-09 01:31:05:
Logged In: YES 
user_id=75003

The requested feature is 'set intersection' ... Instead of 
adding this under list I would rather add a whole section for 
set operations, and then a number of them.

cleverly added on 2003-07-23 09:36:01:

File Added - 56584: list.test.patch

cleverly added on 2003-07-23 09:34:26:

File Added - 56583: list.tcl.patch

cleverly added on 2003-07-23 09:23:06:

File Added - 56582: struct_list.man.patch

cleverly added on 2003-07-23 09:22:27:

File Added - 56581: list.tcl.patch

Logged In: YES 
user_id=22080

I have a patch to both list.tcl (code) and struct_list.man
(documentation).

Attachments: