python:practice highter-order function

def print_all(x,y,z):

     print(z(x)+z(y))

print_all(3,3,get)

60

higher-order function:

define: at least satisify  one in two  condition .accept  one or more function as input   output one function ,function as variable.

function and method all object as variable.

function name actually is a variable name.

function can self assignment to variable . variable immediatly function.

if  one variable point to function ,the variable  can call the function.

function can use for a parameter.

in addition higher-order function  also can as return value.

1:function name can be assignment

2:function name can be use for other function variable 

3:function name can be use for other function return value

原文地址:https://www.cnblogs.com/alansuny/p/12494833.html