Sort by Length for OCaml Golf Competition by jessicah

open List
let l=ref[]and s=String.length;;try while 1=1 do l:=read_line()::!l done with _->iter print_endline(sort(fun a b->match s a-s b with 0->compare a b|x->x)!l)

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

download

return to the top page