Character distance by ksk

let s=read_line()^" "
let rec($)i j=s.[j]=' '&i+1$i+2;s.[i]=s.[j]&()=Printf.printf"%c: %d
"s.[i](j-i);i$j+1;;0$1

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

download

return to the top page