BWT by murky-satyr

(use srfi-1)(while(read-line)#//=> x(let*[(s(string-size x))(l(sort!(map(rec,i(substring #`",x,x"i(+ i s)))(iota s))))](let1 z(fold(rec(_ v r)#`",r,(ref v(- s 1))")""l)(print(list-index(pa$ equal? x)l)" "z))))

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

download

return to the top page