RosettaCodeData/Task/Show-ASCII-table/Factor/show-ascii-table-2.factor

20 lines
393 B
Factor
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
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