Question: Function 2: function-3 In CLISP define a function that takes a function as an argument and passes the number 3 to that function. The function

Function 2: function-3

In CLISP define a function that takes a function as an argument and passes the number 3 to that function. The function argument must be able to accept a single integer as its argument.

Input: A named function which takes a single number as an argument.

Output: The value returned by applying the name function to the number 3.

Examples:

> (function-3 'sqrt)

1.732050807568877

> (function-3 (lambda (x) (+ x 7)))

10

> (function-3 '1+)

4

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!