Question: Standalone Scala Programming Provided functions for testing your implementation: You may put the above functions in each of your solutions. ( 5 points) Write a

Standalone Scala Programming
Standalone Scala Programming Provided functions for testing your implementation: You may put
the above functions in each of your solutions. ( 5 points) Write
a function countZeros that inputs a list of numbers 1 st and
counts how many elements of 1 st are equal to zero. -

Provided functions for testing your implementation: You may put the above functions in each of your solutions. ( 5 points) Write a function countZeros that inputs a list of numbers 1 st and counts how many elements of 1 st are equal to zero. - Your function must be recursive (not necessary that it be tail recursive). - You cannot use loops (for-loops, while loops etc.), and no mutables (var). - You cannot use return statement in your function. - List Operations allowed: - list.length - length of a list; - list.head-extract the first element of a list; - list.tail - extract the sublist from the second element to last element of list. - No other list API functions or API functions of any other data structure allowed. E.g., do not look to convert your list into an array and use some Array API function. Your program should pass the following tests

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!