Changeset 4569


Ignore:
Timestamp:
10/29/03 14:17:13 (18 years ago)
Author:
piso
Message:

STABLE-SORT

Location:
trunk/j/src/org/armedbear/lisp
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/autoloads.lisp

    r4565 r4569  
    22;;;
    33;;; Copyright (C) 2003 Peter Graves
    4 ;;; $Id: autoloads.lisp,v 1.53 2003-10-28 23:45:25 piso Exp $
     4;;; $Id: autoloads.lisp,v 1.54 2003-10-29 14:17:13 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    3434(autoload '(getf get-properties copy-symbol) "symbol.lisp")
    3535(autoload '(open parse-integer))
    36 (autoload '(sort merge) "sort.lisp")
     36(autoload '(sort stable-sort merge) "sort.lisp")
    3737(autoload 'tree-equal)
    3838(autoload 'make-hash-table)
  • trunk/j/src/org/armedbear/lisp/sort.lisp

    r4568 r4569  
    22;;;
    33;;; Copyright (C) 2003 Peter Graves
    4 ;;; $Id: sort.lisp,v 1.5 2003-10-29 13:45:26 piso Exp $
     4;;; $Id: sort.lisp,v 1.6 2003-10-29 14:16:47 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    2323
    2424(defun sort (sequence predicate &key key)
     25  (if (listp sequence)
     26      (sort-list sequence predicate key)
     27      (quick-sort sequence 0 (length sequence) predicate key)))
     28
     29(defun stable-sort (sequence predicate &key key)
    2530  (if (listp sequence)
    2631      (sort-list sequence predicate key)
Note: See TracChangeset for help on using the changeset viewer.