Sort by Length for OCaml Golf Competition by notogawa

let rec f x=try f(read_line()::x)with e->List.map print_endline(List.sort(fun?(l=String.length)a b->compare(l a,a)(l b,b))x);;f[]

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

download

return to the top page