sort by first occurrence by Icewing

main=interact$unlines.f.lines
f(x:y)=x:filter(x==)y++f(filter(x/=)y)
f x=x

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

download

return to the top page