Question: Write a function ( using pure recursion ) which accepts a function, say f , as the first argument and a simple list of integers

Write a function (using pure recursion) which accepts a function, say f, as the first argument and a simple list of integers as the second argument. It then applies function f on every integer of the list and returns the sum of the applications. For example,
LISP>(f2 #'(lambda (y)(* y y))'(123))
14
LISP>(f2 #'(lambda (y)(* y 2))'(123))
12

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 Programming Questions!