2 Star 1 Fork 0

LAI_PYTHON/gomathprolib

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Auxiliary.go 347 Bytes
一键复制 编辑 原始数据 按行查看 历史
wrmdcxy 提交于 2020-06-26 13:03 +08:00 . add
package mathprolib
func Map(type T,type RT)(array []T,function (func(T) RT)) []T{
//静态类型,没办法
var result []T = {}[:]
for _,v := range array{
result = append(result,function(result))
}
return result
}
func Reduce(type T,type RT)(array T,function (func(T,T) RT)) RT{
//泛型就是别扭
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/LAI_PYTHON/gomathprolib.git
git@gitee.com:LAI_PYTHON/gomathprolib.git
LAI_PYTHON
gomathprolib
gomathprolib
master

搜索帮助