delete words by notogawa

import List
main=interact$unlines.f.lines
f(w:x)=x%w%w
x%w=transpose[y#w#reverse w|y<-x]
(a:s)#w@(_:t)|t++(s\\t)==s=' ':s#t|1>0=a:s#w
x#_=x

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

download

return to the top page