Provide functional programming interface to golang
Go to file
Zane.Y 5fe6da1db1 Sorted function 2017-07-17 19:57:20 +08:00
main Sorted function 2017-07-17 19:57:20 +08:00
stream Sorted function 2017-07-17 19:57:20 +08:00
.gitignore Initial commit 2017-07-14 20:32:36 +08:00
LICENSE Initial commit 2017-07-14 20:32:36 +08:00
README.md Update README.md 2017-07-14 21:06:52 +08:00

README.md

go-func

提供针对Golang的函数式编程接口

Provide functional programming interface in golang

使用指南:

1.引入工具包:

import . "github.com/go-func/stream"

2.使用NewSteam或者NewParallelStream函数开启数据流

3.然后追加流操作函数以修改数据

4.使用如Collect、Reduce等流终结操作函数拿到处理结果集

注意:

本工具包提供的并发数据流在处理压力较低或者单核机器上时,并发处理为负优化,请斟酌选择是否并发


Usage:

1.import package:

import . "github.com/go-func/stream"

2.Start steam with function NewSteam or NewParallelStream

3.Append operation function to modify element in stream

4.Terminate stream with any termination operation like Collect,Reduce,etc.

Notice:

The ParallelStream provided by this toolkit may result in negative optimization when meeting low processing pressure or on a single-core machine. Please choose whether or not to use