Scheme Exercises

back to exercise list       previous     next

Group:     Exercise: 36/48 

AllEven?:  Are all the numbers in the list even?

Create the function (AllEven? L) which will be given a list of integers, and will return #t if all of them are even, #f if any of them are odd, and #t if the list is empty.
NOTE: SchemingBat does not have the built-in functions: (odd? N) and (even? N)
For instance:
(AllEven? '(2 4 6)) -> #t
(AllEven? '(2 5 6)) -> #f
(AllEven? '()) -> #t