plot letter grid by ony

r=read
l[a,b,[c]]=((r a,r b),c)
g i=unlines[[maybe '-'id$lookup(x,y)p|x<-e w]|y<-e h]where
 p=map(l.words)$lines i
 a x=(minimum x,maximum x)
 r f=a$map(f.fst)p
 w=r fst
 h=r snd
 e(a,b)=[a..b::Int]
main=interact g

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

download

return to the top page