Version 2 of lrepeat

Updated 2004-02-03 17:27:22

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 .

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

Category Command