Thanks to @danscales for noticing the mistake.
Change-Id: I547ee80a78419765b82d39d7b34dc8d3bf962c35
Reviewed-on: https://go-review.googlesource.com/c/go/+/366215
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dan Scales <danscales@google.com>
<!--{
"Title": "The Go Programming Language Specification - Go 1.18 Draft (incomplete)",
- "Subtitle": "Version of Nov 19, 2021",
+ "Subtitle": "Version of Nov 22, 2021",
"Path": "/ref/spec"
}-->
b B
}
-func (p Pair[A, B]) Swap() Pair[A, B] { return Pair[A, B]{p.b, p.a} }
+func (p Pair[A, B]) Swap() Pair[B, A] { return Pair[B, A]{p.b, p.a} }
func (p Pair[First, _]) First() First { return p.a }
</pre>