#function to give to `twice()`
def two_times_x(x):
return 2*x
#our function:
def twice(fun, xval):
return fun(fun(xval))
a2 = twice(two_times_x, 10)
print(a2)
#function to give to `twice()`
def two_times_x(x):
return 2*x
#our function:
def twice(fun, xval):
return fun(fun(xval))
a2 = twice(two_times_x, 10)
print(a2)