I am fairly new to lisp and this is one of the practice problems.
First of all, this problem is from simply scheme
. I am not sure how to answer this.
The purpose of this question is to write the function, count-odd
that takes a sentence as its input and count how many odd digits are contained in it as shown below:
(count-odd'(234 556 4 10 97)) 6
or
(count-odd '(24680 42 88)) 0
If possible, how would you be able to do it, using higher order functions, or recursion or both - whatever gets the job done.