Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;Удаление нечётных элеметнтов
- (define (remove_odd_tail lst i)
- (cond
- [(null? lst) '()]
- [(odd? i) (cons (car lst) (remove_odd_tail (cdr lst) (+ i 1)))]
- [else (remove_odd_tail (cdr lst) (+ i 1))]
- )
- )
- (remove_odd_tail (list 10 20 30 40 50 60 70 80 90 100) 0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement