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

open String
let rec f s=try f(read_line()::s)with|_->print_string(concat"
"(List.sort(fun x y->2*(length x-length y)+compare x y)s));;f[]

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

download

return to the top page