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

tail?

Conformance: SketchyLISP Extension

Purpose: Check whether an expression is the tail of another one.

Arguments:
X - potential tail
Y - expression

Implementation:

(define (tail? x y)
  (cond ((null? y) (null? x))
    ((equal? x y) #t)
    (else (tail? x (cdr y)))))

Example:

(tail? '(d e f) '(a b c d e f)) 
=> #t

See also:
head?, last.