Commit 6fbc002b authored by Juergen Nickelsen's avatar Juergen Nickelsen
Browse files

fixed assq, sassoc, sassq

parent 411a4d73
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -631,7 +631,7 @@ list as appropriate."
      nil
      nil
    (if (eq item (caar alist))
    (if (eq item (caar alist))
        (car alist)
        (car alist)
      (assoc item (cdr alist)))))
      (assq item (cdr alist)))))


(defun sassoc (item alist func)
(defun sassoc (item alist func)
    "return the pair of ALIST whose car is equal to ITEM, or call FUNC"
    "return the pair of ALIST whose car is equal to ITEM, or call FUNC"
@@ -639,7 +639,7 @@ list as appropriate."
      (func)
      (func)
    (if (equal item (caar alist))
    (if (equal item (caar alist))
        (car alist)
        (car alist)
      (assoc item (cdr alist)))))
      (sassoc item (cdr alist) func))))


(defun sassq (item alist func)
(defun sassq (item alist func)
    "return the pair of ALIST whose car is equal to ITEM, or call FUNC"
    "return the pair of ALIST whose car is equal to ITEM, or call FUNC"
@@ -647,5 +647,5 @@ list as appropriate."
      (func)
      (func)
    (if (eq item (caar alist))
    (if (eq item (caar alist))
        (car alist)
        (car alist)
      (assoc item (cdr alist)))))
      (sassq item (cdr alist) func))))