proc random:select L {lindex $L [expr int(rand()*[llength $L].)]} +proc random:select L {lindex $L [expr int(rand()*[llength $L].)]} proc lexpr {term L} { - # map an expr term to each element \$i of a list + # map an expr term to each element \$i of a list set res [list] - foreach i $L {lappend res [eval expr $term]} + foreach i $L {lappend res [eval expr $term]} set res }