Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (define listica (cons 6 (cons 7 (cons 8 (cons 9 (cons 7 (cons 9 empty)))))))
- (define (Par lista)
- (cond
- [(not (list? lista)) "Ingrese una lista"]
- [(empty? lista) empty]
- [(even? (first lista)) (cons (first lista) (Par (rest lista)))]
- [else (Par (rest lista))]
- ))
- (Par (cons 2 (cons 100 (cons 29 (cons 43 (cons 102 empty))))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement