Paste: in-place sort

Author: mrjbq7
Mode: factor
Date: Tue, 11 Oct 2011 00:18:56
Plain Text |
! FIXME: these are awful, need an in-place sort!

: sort-with! ( seq quot: ( elt -- key ) -- )
    dupd sort-with swap 0 swap copy ; inline

: inv-sort-with! ( seq quot: ( elt -- key ) -- )
    dupd inv-sort-with swap 0 swap copy ; inline

New Annotation

Summary:
Author:
Mode:
Body: