Revert "core: Add member."
This reverts commit 921686a0a3b06281f1804d04e6d4a0344dda507a.
This commit is contained in:
parent
f33d23bca1
commit
da724cdaa1
|
@ -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)
|
||||
|
|
18
src/lib.c
18
src/lib.c
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue