-
-
Notifications
You must be signed in to change notification settings - Fork 9
Pair
Isaac Shelton edited this page Dec 27, 2023
·
8 revisions
Pair represents the type of a pair.
| Type | Size | Memory Management Model | File |
|---|---|---|---|
Pair |
? bytes | Scoped | 2.7/Pair.adept |
AsymmetricPair |
? bytes | Scoped | 2.7/Pair.adept |
record <$T> Pair (first, second $T)
record <$T, $S> AsymmetricPair (first $T, second $S)
where
$T and $S are any valid type
| Name | Type | Description |
|---|---|---|
first |
$T |
First item |
second |
$T, $S
|
Second item |
Children are freed when they run out of scope.
-
func pair(first, second $T) <$T> Pair(for backwards compatibility)
Constructs a
Pair. -
func asymmetricPair(first $T, second $S) <$T, $S> AsymmetricPair(for backwards compatibility)
Constructs an
AsymmetricPair. -
func clone(this *<$T> Pair) <$T> Pairwhere$Tand$Sare clonable. (since v2.8)Clones an
Pairand its elements. -
func clone(this *<$T, $S> AsymmetricPair) <$T, $S> AsymmetricPairwhere$Tand$Sare clonable. (since v2.8)Clones an
AsymmetricPairand its elements.