Sort by Length for OCaml Golf Competition by harre (rakuda)

open String
let rec(!)s=try!([read_line()]@s)with _->print_string(concat"
"(List.sort(fun a b->(length a-length b)*2+compare a b)s));;![]

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

download

return to the top page