adventofcode2023/prelude.tcl

19 lines
292 B
Tcl
Raw Normal View History

2023-12-06 08:29:33 +00:00
package require Tcl 8.6
namespace import tcl::mathfunc::min
namespace import tcl::mathfunc::max
2023-12-07 21:59:35 +00:00
proc {#} args {}
2023-12-06 08:29:33 +00:00
proc ladd {list} {
set t 0
foreach x $list { incr t $x }
return $t
}
proc lmul {list} {
set p 1
foreach x $list { set p [eval {$p * $x}] }
return $p
}