/go-intersect

Find the intersection of two iterable values

Primary LanguageGoMIT LicenseMIT

go-intersect

Find the intersection of two iterable values.

This library provides multiple implementations which each have their strong and weak points.

Read the docs.

Build Status

Installation

$ go get github.com/juliangruber/go-intersect

Example

import "github.com/juliangruber/go-intersect"
import "fmt"

func main() {
  a := []int{1, 2, 3}
  b := []int{2, 3, 4}
  fmt.Println(intersect.Simple(a, b))
}