Question: In CLISP define a function that takes a function as an argument and passes the number 7 to that function. The function argument must be
In CLISP define a function that takes a function as an argument and passes the number 7 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 7.
Examples:
> (function-7 sqrt)
2.645751311064591
> (function-7 (lambda (x) (+ x 7)))
14
> (function-7 add1)
8
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
