Sort by Length for OCaml Golf Competition by komamitsu

open String
let rec p l =try p(read_line()::l)with _->l
let _=List.iter(fun s->print_endline s)(List.sort(fun a b->(length a-length b)*99+compare a b)(p[])) 

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

download

return to the top page