Created
April 23, 2018 20:09
-
-
Save ConorOBrien-Foxx/59cf66c55cbd3e41567c48892d7d277a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
??{#Unique[±_<:BinBelow!#_:>Sum]} | |
data := Random[ | |
range := 10 | |
inner := Chunk[Sort[data], Floor@`/&range] | |
keys ' values := Tr[inner] | |
size := Max[Size => keys] + 3 | |
width := size + 2 | |
format_key[key] := "[" + Center[String[key], size] + "]" | |
col_widths := Size => values | |
el := Center["#", width] | |
pad := " " * width | |
Print[OverGrid[Reverse@Tr]!Grid[Repeat[el, col_widths],pad]] | |
Print[...keys * range :> format_key, joiner->es] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment