Revert "core: Add member."

This reverts commit 921686a0a3b06281f1804d04e6d4a0344dda507a.
This commit is contained in:
Jan Nieuwenhuizen 2018-04-07 13:15:26 +02:00
parent f33d23bca1
commit da724cdaa1
2 changed files with 5 additions and 18 deletions

View file

@ -126,6 +126,11 @@
(define memv memq)
(define (member x lst)
(if (null? lst) #f
(if (equal? x (car lst)) lst
(member x (cdr lst)))))
;;; Lists
(define (make-list n . x)

View file

@ -312,21 +312,3 @@ equal2_p (SCM a, SCM b)
}
return eq_p (a, b);
}
SCM
member (SCM x, SCM a)
{
switch (TYPE (x))
{
case TCHAR:
case TNUMBER:
case TKEYWORD:
case TSYMBOL:
case TSPECIAL:
return memq (x, a);
default:
while (a != cell_nil && equal2_p (x, CAR (a)) != cell_t)
a = CDR (a);
}
return a != cell_nil ? a : cell_f;
}