blob: 9325010e00ac1245293a15c0172a5682d4ae82c7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
--- 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 } {
|