上QQ阅读APP看书,第一时间看更新
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.