Documentation
¶
Overview ¶
Package tuple simplifies packing and unpacking function arguments and results into generic tuple types.
Example ¶
package main import ( "github.com/tawesoft/golib/v2/must" "github.com/tawesoft/golib/v2/tuple" ) func main() { // types inferred implicitly a := tuple.ToT2(5, true) b := tuple.ToT2(7, true) must.Not(a == b) // explicitly typed c := tuple.ToT2[int32, bool](5, true) d := tuple.ToT2[int32, bool](7, true) must.Not(c == d) }
Output:
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.