Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (define (nodots s)
- (cond
- ((null? (cdr s)) (cons (car s) ()))
- ((pair? (car s)) (if (and (not (pair? (cdr s))) (not (null? (cdr s)))) (cons (nodots (car s)) (cons (cdr s) ())) (cons (nodots (car s)) (nodots (cdr s)))))
- ((and (not (pair? (cdr s))) (not (null? (cdr s)))) (cons (car s) (cons (cdr s) ())))
- (else (cons (car s) (nodots (cdr s))))
- )
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement