blob: fa7cc539beb9c089b89dd4138dc3407655f95d19 [file] [log] [blame]
// Copyright 2021 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package generics uses generics.
package generics
type Pair[A, B any] struct {
V0 A
V1 B
}
// NewPair returns a new Pair.
func NewPair[A, B any](a A, b B) Pair[A, B] {
return Pair[A, B]{a, b}
}