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

let rec(!)x=try!x@let a=read_line()in[String.length a,a^"
"]with _->x and p(x,y)=print_string y;;List.iter
p(List.sort compare![])

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

download

return to the top page