(define (cycles-1? r)
(define checklist '())
(define (loop r)
(cond ((null? r) #f)
((memq r checklist) #t)
(else
(set! checklist (cons r checklist))
(loop (cdr r)))))
(loop r))
(define (cycles-2? r)
(define (check-until-pos lst pos wat)
(if (= pos 0)
#f
(if (eq? lst wat)
#t
(check-until-pos (cdr lst) (-1+ pos) wat))))
(define (looplst lst aantal)
(cond ((null? lst) #f)
((check-until-pos r aantal lst) #t)
(else (looplst (cdr lst) (1+ aantal)))))
(looplst r 0))