t3x.org / sketchy / library / memv.html
SketchyLISP
Reference
  Copyright (C) 2007
Nils M Holm

memv

Conformance: R5RS Scheme

Purpose: Return the sublist starting at the first member of a list that is equivalent to a given atom. If no such member exists, return #f.

Arguments:
X - atom to find
A - list

Implementation:

(define (memv x a)
  (cond ((null? a) #f)
    ((eqv? (car a) x) a)
    (else (memv x (cdr a)))))

Example:

(memv '4 '(1 2 3 4 5 6)) 
=> (4 5 6)

See also:
memq, member, assv.