PasteRack.org
Paste # 55749
2022-05-04 16:35:18

Fork as a new paste.

Paste viewed 268 times.


Embed:

  1. #lang racket
  2.  
  3. (define occur?
  4.   (lambda (x L)
  5.     (cond ((empty? L) #f)
  6.           ((equal? x (car L)) #t)
  7.           (else (occur? x (cdr L))))))
  8.  
  9.  
  10. (occur? 3 '(121314))

=>

#f