Sort by Length for OCaml Golf Competition by hat

open String let m,l=length,ref[]let rec n _=n(l:=read_line()::!l);;try n()with _->List.iter print_endline(List.sort(Obj.magic(fun a b->m a>m b||m a=m b&&a>b))!l)

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

download

return to the top page