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

open List
let(@)=map
let rec($)y n=Scanf.scanf"%s %n"(fun s t->t>n&(t-n,s)::y$t||[]<print_endline@snd@sort compare y);;[]$0

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

download

return to the top page