Changeset 7229


Ignore:
Timestamp:
Sep 16, 2007, 6:23:18 AM (12 years ago)
Author:
gb
Message:

ASSEQUAL, MEMEQUAL.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0709/ccl/level-0/l0-utils.lisp

    r6916 r7229  
    107107    (assq item list)))
    108108
     109(defun assequal (item list)
     110  (dolist (pair list)
     111    (if pair
     112      (if (equal item (car pair))
     113        (return pair)))))
     114
     115
    109116;;; (memeql item list) <=> (member item list :test #'eql :key #'identity)
    110117(defun memeql (item list)
     
    113120         ((endp l))
    114121      (when (eql (%car l) item) (return l)))
    115     (memq item list))
    116 )
     122    (memq item list)))
     123
     124(defun memequal (item list)
     125  (do* ((l list (%cdr l)))
     126       ((endp l))
     127    (when (equal (%car l) item) (return l))))
    117128
    118129
Note: See TracChangeset for help on using the changeset viewer.