Tk Library Source Code

Artifact [57e2dc9a79]
Login

Artifact 57e2dc9a79f65ebac1d72388a470f30d29d16b05:

Attachment "struct_list.man.patch" to ticket [776010ffff] added by cleverly 2003-07-23 09:23:06.
--- modules/struct/struct_list.man	2003-05-20 23:33:20.000000000 -0600
+++ modules/struct/struct_list.man.new	2003-07-22 20:42:08.000000000 -0600
@@ -411,6 +411,17 @@
     {{0 0 0} {0 0 0} {0 0 0} {0 0 0}} {{0 0 0} {0 0 0} {0 0 0} {0 0 0}} {{0 0 0} {0 0 0} {0 0 0} {0 0 0}} {{0 0 0} {0 0 0} {0 0 0} {0 0 0}} {{0 0 0} {0 0 0} {0 0 0} {0 0 0}}
 }]
 
+[call [cmd ::struct::list] [method commonElements] [arg list_of_lists]]
+
+The subcommand expects to receive a list of lists and returns a sorted list
+containing the element(s) (if any) that are common to each and every
+one of the sublists.
+
+[example {
+    tclsh> ::struct::list commonElements {{1 2 3 4 5} {2 4 6 8 10} {2 4 8 16 32}}
+    2 4
+}]
+
 
 [call [cmd ::struct::list] [method dbJoin] [opt [option -inner]|[option -left]|[option -right]|[option -full]] [opt "[option -keys] [arg varname]"] \{[arg keycol] [arg table]\}...]
 
@@ -618,4 +629,5 @@
 [keywords folding reduce]
 [keywords equality equal repetition repeating]
 [keywords {inner join} {left outer join} {right outer join} {full outer join} {outer join} join]
+[keywords {common elements}]
 [manpage_end]