Skip to content

Instantly share code, notes, and snippets.

@canoon
Created November 14, 2013 13:57
Show Gist options
  • Save canoon/7467207 to your computer and use it in GitHub Desktop.
Save canoon/7467207 to your computer and use it in GitHub Desktop.
fmtsdk =: ((;/"3)&(3 3 3 3&$))
bare =: (,/,/ (i. 3) |."1"0 _ ((3 * i. 3) |."0 _ (1 + i.9)))
fmtsdk bare
┌─────┬─────┬─────┐
│1 2 3│4 5 6│7 8 9│
│4 5 6│7 8 9│1 2 3│
│7 8 9│1 2 3│4 5 6│
├─────┼─────┼─────┤
│2 3 4│5 6 7│8 9 1│
│5 6 7│8 9 1│2 3 4│
│8 9 1│2 3 4│5 6 7│
├─────┼─────┼─────┤
│3 4 5│6 7 8│9 1 2│
│6 7 8│9 1 2│3 4 5│
│9 1 2│3 4 5│6 7 8│
└─────┴─────┴─────┘
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment