A Sort Optimization Technique: decorate-sort-dedecorate

William James w_a_x_man at yahoo.com
Mon Aug 28 04:28:40 EDT 2006


xahlee at gmail.com wrote:

> I would be interested in comments about how Common Lisp, Scheme, and
> Haskell deal with the decorate-sort-dedecorate technique.

%w(FORTRAN LISP COBOL).sort_by{|s| s.reverse}
    ==>["COBOL", "FORTRAN", "LISP"]

--
Common Lisp did kill Lisp.  Period. ...  It is to Lisp what
C++ is to C.  A monstrosity that totally ignores the basics
of language design, simplicity, and orthogonality to begin
with.  ---  Bernard Lang




More information about the Python-list mailing list