Comment detail

与えられた文字列でピラミッド (Nested Flatten)

なんか美しくないですが...

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
%!PS

/pyramid { % (string) pyramid -
    dup length 1 sub dup -1 0 {
        dup { ( ) print } repeat
        1 2 index {
            2 index exch 1 getinterval print ( ) print
        } for
        ( ) =
    } for
} def

% ------- Test Code -------- 
(hoge) pyramid
(abracadabra) pyramid

Index

Feed

Other

Link

Pathtraq

loading...