RosettaCodeData/Task/Show-ASCII-table/Factor/show-ascii-table-2.factor
2023-07-01 13:44:08 -04:00

19 lines
393 B
Factor

USING: combinators formatting io kernel math math.ranges
pair-rocket sequences ;
IN: rosetta-code.ascii-table
: main ( -- )
16 <iota> [
32 + 127 16 <range> [
dup {
32 => [ "Spc" ]
127 => [ "Del" ]
[ "" 1sequence ]
} case
"%3d : %-3s " printf
] each
nl
] each
;
MAIN: main