open Array let a=make 60""let rec($)i?(c=input_char stdin)j=c=' '&0$j+1;a.(50+i+j)<-Printf.sprintf"%*s%c"(i*2-j*2)a.(50+i+j)c;i-1$j;;try 0$0with _->map(fun s->s>""&()=print_endline s;s)a=a
Note that non-ascii characters in the above source code will be escaped (such as \x9f).