tomMoulard / iter

Go iter tools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Go iter tools

License:MIT License


Languages

Language:Go 94.6%Language:Makefile 5.4%