【文件属性】:
文件名称:func-go:Go 中的函数式编程
文件大小:5KB
文件格式:ZIP
更新时间:2021-06-06 09:47:18
Go
功能去
Go 中的函数式编程
安装
go get github.com/peking2/func-go
用法
import . "github.com/peking2/func-go"
res := NewArray ([] int { 1 , 2 , 3 , 4 , 5 }).
Map ( func ( i Any ) Any { return i .( int ) * 2 }).
Reduce ( func ( a Any , b Any ) Any { return a .( int ) + b .( int ) })
GoDoc
CONSTANTS
const (
ERROR_INVALID_PARAMETER = "Invalid parameters"
)
FUNCTIONS
func WrapFunc ( f Any ) func ( ... Any ) T
【文件预览】:
func-go-master
----Array.go(1KB)
----Any.go(38B)
----Try_test.go(880B)
----Try.go(1KB)
----Map_test.go(1KB)
----Array_test.go(845B)
----README.md(1KB)
----Any_test.go(27B)
----Map.go(659B)
----consts.go(75B)