Version 13 of lrepeat

Updated 2004-02-04 16:28:01

lrepeat was defined in TIP 157 [L1 ] , which has been approved for incorporation into Tcl 8.5.0 .

Eventually, the doc will be here: http://www.purl.org/tcl/home/man/tcl8.5/TclCmd/lsearch.html

 lrepeat number element1 ?element2 element3 ...?

This command builds up a list by repeating elements. It will be a part of Tcl 8.5.0 . Note that Tcl 8.5 is available in an early developer form from ftp://ftp.tcl.tk/pub/tcl/nightly-cvs/tcl-*gz . Early access to Tk 8.5 is there as well.

An example of how it will work is

  lrepeat 3 a

 a a a

RS: Note the possible confusion with string repeat's syntax:

 % string repeat a 5
 aaaaa

FW: A forward-compatible version for versions before 8.5 is available in Additional list functions


Category Command