Changeset 2729


Ignore:
Timestamp:
07/02/03 18:35:33 (18 years ago)
Author:
piso
Message:

(in-package "SYSTEM")

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

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/delete-duplicates.lisp

    r2727 r2729  
    22;;;
    33;;; Copyright (C) 2003 Peter Graves
    4 ;;; $Id: delete-duplicates.lisp,v 1.3 2003-07-02 18:20:58 piso Exp $
     4;;; $Id: delete-duplicates.lisp,v 1.4 2003-07-02 18:32:30 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    1818;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
    1919
    20 (in-package "COMMON-LISP")
     20(in-package "SYSTEM")
    2121
    2222;;; From CMUCL.
  • trunk/j/src/org/armedbear/lisp/member-if.lisp

    r2723 r2729  
    22;;;
    33;;; Copyright (C) 2003 Peter Graves
    4 ;;; $Id: member-if.lisp,v 1.2 2003-07-02 17:58:28 piso Exp $
     4;;; $Id: member-if.lisp,v 1.3 2003-07-02 18:35:00 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    1818;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
    1919
    20 (in-package "COMMON-LISP")
     20(in-package "SYSTEM")
    2121
    2222(defun member-if (test list &key key)
    2323  (do ((list list (cdr list)))
    2424      ((endp list) nil)
    25     (if (funcall test (sys::apply-key key (car list)))
     25    (if (funcall test (apply-key key (car list)))
    2626  (return list))))
    2727
     
    2929  (do ((list list (cdr list)))
    3030      ((endp list) ())
    31     (if (not (funcall test (sys::apply-key key (car list))))
     31    (if (not (funcall test (apply-key key (car list))))
    3232  (return list))))
  • trunk/j/src/org/armedbear/lisp/subst.lisp

    r2723 r2729  
    22;;;
    33;;; Copyright (C) 2003 Peter Graves
    4 ;;; $Id: subst.lisp,v 1.2 2003-07-02 18:00:09 piso Exp $
     4;;; $Id: subst.lisp,v 1.3 2003-07-02 18:35:33 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    1818;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
    1919
    20 (in-package "COMMON-LISP")
     20(in-package "SYSTEM")
    2121
    2222;;; From CMUCL.
     
    2424(defmacro satisfies-the-test (item elt)
    2525  (let ((key-tmp (gensym)))
    26     `(let ((,key-tmp (sys::apply-key key ,elt)))
     26    `(let ((,key-tmp (apply-key key ,elt)))
    2727       (cond (testp (funcall test ,item ,key-tmp))
    2828             (notp (not (funcall test-not ,item ,key-tmp)))
     
    4343(defun subst-if (new test tree &key key)
    4444  (labels ((s (subtree)
    45         (cond ((funcall test (sys::apply-key key subtree)) new)
     45        (cond ((funcall test (apply-key key subtree)) new)
    4646        ((atom subtree) subtree)
    4747        (t (let ((car (s (car subtree)))
     
    5555(defun subst-if-not (new test tree &key key)
    5656  (labels ((s (subtree)
    57         (cond ((not (funcall test (sys::apply-key key subtree))) new)
     57        (cond ((not (funcall test (apply-key key subtree))) new)
    5858        ((atom subtree) subtree)
    5959        (t (let ((car (s (car subtree)))
     
    8282(defun nsubst-if (new test tree &key key)
    8383  (labels ((s (subtree)
    84         (cond ((funcall test (sys::apply-key key subtree)) new)
     84        (cond ((funcall test (apply-key key subtree)) new)
    8585        ((atom subtree) subtree)
    8686        (t (do* ((last nil subtree)
    8787           (subtree subtree (cdr subtree)))
    8888                            ((atom subtree)
    89                              (if (funcall test (sys::apply-key key subtree))
     89                             (if (funcall test (apply-key key subtree))
    9090                                 (setf (cdr last) new)))
    91        (if (funcall test (sys::apply-key key subtree))
     91       (if (funcall test (apply-key key subtree))
    9292           (return (setf (cdr last) new))
    9393           (setf (car subtree) (s (car subtree)))))
     
    9797(defun nsubst-if-not (new test tree &key key)
    9898  (labels ((s (subtree)
    99         (cond ((not (funcall test (sys::apply-key key subtree))) new)
     99        (cond ((not (funcall test (apply-key key subtree))) new)
    100100        ((atom subtree) subtree)
    101101        (t (do* ((last nil subtree)
    102102           (subtree subtree (cdr subtree)))
    103103                            ((atom subtree)
    104                              (if (not (funcall test (sys::apply-key key subtree)))
     104                             (if (not (funcall test (apply-key key subtree)))
    105105                                 (setf (cdr last) new)))
    106        (if (not (funcall test (sys::apply-key key subtree)))
     106       (if (not (funcall test (apply-key key subtree)))
    107107           (return (setf (cdr last) new))
    108108           (setf (car subtree) (s (car subtree)))))
Note: See TracChangeset for help on using the changeset viewer.