|
SketchyLISP Reference |
Copyright (C) 2007 Nils M Holm |
| <<[succ] | [Index] | [union]>> |
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
| <<[succ] | [Index] | [union]>> |