Evaluated proc map2hb mmap { set out ""; for {set y 0} {$y < [llength $mmap]} {incr y 2} { for {set x 0} {$x < [llength [lindex $mmap $y]] } {incr x} { append out [hb [map2hb_xy $x $y] [map2hb_xy $x [+ $y 1]]] }; append out \n }; . $out }