/iter

Go iter tools

Primary LanguageGoMIT LicenseMIT

Iter

A go package that provides a ways to iterate over elements.

Installation

go get github.com/tommoulard/iter

Usage

package main

import (
    "fmt"

    "github.com/tommoulard/iter"
)


func main() {
    for a, b := range iter.Zip([]int{1, 2, 3}, []int{4, 5, 6}) {
        fmt.Println(a, b)
    }

    // Output:
    // 1 4
    // 2 5
    // 3 6
}

See the GoDoc for more information.

Ideas