diff --git a/day07/sol.tcl b/day07/sol.tcl index 3b27e94..f501c97 100755 --- a/day07/sol.tcl +++ b/day07/sol.tcl @@ -1,6 +1,5 @@ #!/usr/bin/env tclsh -#source ../prelude.tcl -proc {#} args {} +source ../prelude.tcl proc parse input { return [join [split [read $input] "\n"]] diff --git a/prelude.tcl b/prelude.tcl index 19e91c1..d7d7389 100644 --- a/prelude.tcl +++ b/prelude.tcl @@ -2,6 +2,8 @@ package require Tcl 8.6 namespace import tcl::mathfunc::min namespace import tcl::mathfunc::max +proc {#} args {} + proc ladd {list} { set t 0 foreach x $list { incr t $x }