expand text by tttaki

r=replicate
h n 2 l=[]
h n p l="\n":map(\c->c:r(n-2)' '++[c])l++h n(p-1)l
main=do n<-readLn;l<-getLine;mapM putStr$map(r n)l++h n n l++["\n"]++map(r n)l

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page