Home /
Expert Answers /
Computer Science /
question-4-quad-6-mathrm-pts-define-a-recursive-function-1st0ddsum-which-when-given-a-l-pa849
(Solved):
Question \( 4 \quad(6 \mathrm{pts}) \) Define a recursive function 1st0ddSum, which when given a l ...
Question \( 4 \quad(6 \mathrm{pts}) \) Define a recursive function 1st0ddSum, which when given a list of numbers, it returns the sum of numbers at odd positions in the list. Your implementation 5 should return 0 if the list is empty. You can assume that the input is a list of numbers without nested lists. For example: (lstOddSum '()) ; returns 0 (lstOddSum '( \( \left.\left.\begin{array}{lll}1 & 2 & 3\end{array}\right)\right) \); returns 1 (lstOddSum '( \( \left.\begin{array}{llll}1 & 2 & 3 & 4\end{array}\right) \) ) ; returns 4