>(help 'member) ----------------------------------------------------------------------------- MEMBER [Function] (not found "gcl.info") From ((MEMBER . Lists) gcl-si.info): -- Function: MEMBER (item list &key (test #'eql) test-not (key #'identity)) Package:LISP Returns the tail of LIST beginning with the first ITEM. ----------------------------------------------------------------------------- >(MEMBER 1 '(1 2 3 4 5 6)) (1 2 3 4 5 6) >(MEMBER 2 '(1 2 3 4 5 6)) (2 3 4 5 6) >(MEMBER 2 '(1 2 3 4 5 (6))) (2 3 4 5 (6)) >(MEMBER 2 '(1 2 3 4 5 ((6)))) (2 3 4 5 ((6))) >(MEMBER 3 '(1 2 3 4 5 ((6)))) (3 4 5 ((6))) >(MEMBER 6 '(1 2 3 4 5 ((6)))) NIL >(MEMBER 9 '(1 2 3 4 5 6)) NIL ;;;----------------------------------------------------------------------------- ;;; If X has never been read by READ, it will not be found. But after it's been ;;; read (say, by attempting to evaluate it, or given with (quote x)), it will ;;; be created, though will be unbound (and so evaluating it would still result ;;; in an error). >(FIND-SYMBOL "X") NIL NIL >(quote x) X >(FIND-SYMBOL "X") X :INTERNAL >(FIND-SYMBOL "MEMBER") MEMBER :INTERNAL ;;; Symbols with names that start with : are special; they are created to evaluate to ;;; themselves (and GCL won't let you change it). >:internal :INTERNAL ;;; They actually live is a separate "package" (namespace) called "KEYWORD": >(SYMBOL-PACKAGE :internal) #<"KEYWORD" package> ;;;----------------------------------------------------------------------------- ;;; Equality has four tests in LISP: EQ, EQL, EQUAL, and EQUALP ;;; ;;; Read about these in https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node74.html ;;; and try various examples out in your LISP. Here are a few. >(eq (cons 1 nil) (cons 1 nil)) NIL >(eq "foo" "foo") NIL >(eql "foo" "foo") NIL >(equal "foo" "foo") T >(equal (cons 1 nil) (cons 1 nil)) T >(eql 1 1) T >(eq 1 1) T >(eq 1000000 1000000) T ;;;----------------------------------------------------------------------------- >(REM REM REMHASH REMOVE-DUPLICATES REMOVE-IF-NOT REMF REMOVE REMOVE-IF REMPROP >(REMOVE- REMOVE-DUPLICATES REMOVE-IF REMOVE-IF-NOT >(help 'REMOVE-IF) ----------------------------------------------------------------------------- REMOVE-IF [Function] (not found "gcl.info") From ((REMOVE-IF . Sequences and Arrays and Hash Tables) gcl-si.info): -- Function: REMOVE-IF (test sequence &key (from-end nil) (start 0) (end (length sequence)) (count most-positive-fixnum) (key #'identity)) Package:LISP Returns a copy of SEQUENCE with elements satisfying TEST removed. ----------------------------------------------------------------------------- >(evenp 2) T >(evenp 3) NIL >(REMOVE-IF 'evenp '(1 2 3 4 5 6 6 8 76764)) (1 3 5) >(REMOVE-IF-NOT 'evenp '(1 2 3 4 5 6 6 8 76764)) (2 4 6 6 8 76764) >(REMOVE-IF-NOT (lambda (x) (> x 1)) '(1 2 3 4 5 6 6 8 76764)) (2 3 4 5 6 6 8 76764) >(REMOVE-IF-NOT (lambda (x) (> x 10)) '(1 2 3 4 5 6 6 8 76764)) (76764) >(lambda (x) (+ x 1)) (LAMBDA-CLOSURE () () () (X) (+ X 1)) >(mapcar (lambda (x) (+ x 1)) '(1 2 3 4 5 5 6 66)) (2 3 4 5 6 6 7 67) >(mapcar (lambda (x) (* x 100)) '(1 2 3 4 5 5 6 66)) (100 200 300 400 500 500 600 6600)