Updated 2014-06-16 14:33:08 by pooryorick

struct::list is a part of the struct module in the tcllib distribution.

Synopsis  edit

struct::list which provides the following subcommands:
assign sequence varname ?varname ...?
dbJoin ?-inner|-left|-right|-full? ?-keys varname? {keycol table}...
dbJoinKeyed ?-inner|-left|-right|-full? ?-keys varname? table...
equal a b
filter sequence cmdprefix
filterfor var sequence expr
firstperm list
flatten ?-full? ?--? sequence
fold sequence initialvalue cmdprefix
foreachperm var list body
iota n
lcsInvert lcsData len1 len2
lcsInvert2 lcs1 lcs2 len1 len2
lcsInvertMerge lcsData len1 len2
lcsInvertMerge2 lcs1 lcs2 len1 len2
longestCommonSubsequence sequence1 sequence2 ?maxOccurs?
longestCommonSubsequence2 sequence1 sequence2 ?maxOccurs?
map sequence cmdprefix
mapfor var sequence script
nextperm perm
permutations list
repeat size element1 ?element2 element3 ...?
repeatn value size...
reverse sequence
shift listvar
split sequence cmdprefix ?passVar failVar?
swap listvar i j

The prefix lcs, as used by a number of the methods above, stands for longest common subsequence.

Documentation  edit

official reference(alternate)
official reference, development version

Historical  edit

comments? new tcllib module: listutil, comp.lang.tcl, 2001-09-16
listutil.tcl(alternate), Glenn Jackman
this functionality ended up in dict, lsearch, lassign, or struct::list, and struct::set.


[Category [Package] of [tcllib]][Category [Category Data Structure]]