add example

This commit is contained in:
a 2022-03-26 20:57:38 -05:00
parent a8fad03cc6
commit 1150d7e564
1 changed files with 18 additions and 0 deletions

View File

@ -20,6 +20,24 @@ features:
todo: todo:
- idk - idk
example: adding some numbers
```
package main
import (
"log"
"git.tuxpa.in/a/lambda"
)
func main(){
arr := []int{1, 2, 3, 4, 6, 5}
ans := lambda.Map(arr, func(x int) int { return x + 4 })
// ans = []int{5, 6, 7, 8, 10, 9}
log.Println(ans)
}
```
## parallel ## parallel
subpackage parallel provides parallelized operations on generic array types subpackage parallel provides parallelized operations on generic array types