Task

Produce a formatted   12×12   multiplication table of the kind memorized by rote when in primary (or elementary) school.



Only print the top half triangle of products.




 
templates formatN&{width:}
  [ 1..$width -> ' ', '$;'... ] -> '$(last-$width+1..last)...;' !
end formatN
 
'  |$:1..12 -> formatN&{width: 4};
' -> !OUT::write
'--+$:1..12*4 -> '-';
' -> !OUT::write
1..12 -> \( def row: $;
  '$ -> formatN&{width:2};|$:1..($-1)*4 -> ' ';$:$..12 -> $*$row -> formatN&{width:4};
' ! \) -> !OUT::write
 