Sort by Length for OCaml Golf Competition by yt

with
ada.containers.indefinite_ordered_sets;procedure
gnat.spitbol.patterns.a
is
function z(l,r:string)return boolean is begin
return(r'last-l'last)*2+boolean'pos(l<r)>0;end;package
v
is
new
ada.containers.indefinite_ordered_sets(string,z);use
v;c:set;i:cursor;begin
while not end_of_file loop
c.insert(get_line);end
loop;i:=c.first;loop
put_line(element(i));next(i);end loop;end;

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

download

return to the top page