匿名函数lambda
作者:互联网
Golang
// https://blog.csdn.net/yyclassmvp/article/details/124942527
sum := func(x int, y int) int {
return x*y
}
Nodejs
const sum = (x, y) => x*y;
Python
sum = lambda x, b: x*b
C#
// https://blog.csdn.net/wojiuguowei/article/details/124492540
// 前2个参数类型,后1个返回值类型
Func< int, int, int> sum = (x, y) => x * y;
标签:函数,int,sum,blog,匿名,csdn,details,https,lambda 来源: https://www.cnblogs.com/fanyang1/p/16629982.html