- Learning Functional Programming in Go
- Lex Sheehan
- 61字
- 2025-02-27 05:14:32
Testing itertool's Map function
Let’s test itertool's Map function by passing it a collection of words of various lengths and a literal function to operate on each word to return its length:
package itertools
import (
"testing"
"reflect"
. "github.com/yanatan16/itertools"
)
Let's not forget to run go get -u github.com/yanatan16/itertools to download the itertools package along with its dependencies.