HeroBaga

Untitled

Oct 22nd, 2021
922
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;Удаление нечётных элеметнтов
  2. (define (remove_odd_tail lst i)
  3.   (cond
  4.     [(null? lst) '()]
  5.     [(odd? i) (cons (car lst) (remove_odd_tail (cdr lst) (+ i 1)))]
  6.     [else (remove_odd_tail (cdr lst) (+ i 1))]
  7.   )
  8. )
  9. (remove_odd_tail (list 10 20 30 40 50 60 70 80 90 100) 0)
RAW Paste Data