--- a/tcl/tools.tcl 2012-11-22 22:34:00.000000000 +0100 +++ b/tcl/tools.tcl 2018-08-03 12:41:39.614684540 +0200 @@ -36,6 +36,7 @@ return $h } +if {[llength [info commands lreverse]] == 0} { # return the same list in reverse order proc lreverse { list } { @@ -45,7 +46,9 @@ } return $reverse } +} +if {[llength [info commands lmap]] == 0} { # aply command map on each element of list, returning the a new list proc lmap { list map } { set mapped {} @@ -54,6 +57,7 @@ } return $mapped } +} # print line wrapped to specified width proc wrappedputs { line width } {