Sort by Length for OCaml Golf Competition by keigoi

open List let rec f?(l=read_line())_=l::try f 0with _->[]and l=String.length;;map print_endline(Sort.list(fun x y->l x<l y||l x=l y&&x<y)(f 0))

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

download

return to the top page