Sort by Length for OCaml Golf Competition by y_sawa

let rec(&)l w v=try(read_line()::l&w)v with _->List.map print_endline(List.sort(fun a b->(w a-w b)*2+compare a  b)l);;([]&String.length)0

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

download

return to the top page