Skip to content
Isaac Shelton edited this page Dec 27, 2023 · 8 revisions

Pair

Pair represents the type of a pair.

Specifications

Type Size Memory Management Model File
Pair ? bytes Scoped 2.7/Pair.adept
AsymmetricPair ? bytes Scoped 2.7/Pair.adept

Definition

record <$T> Pair (first, second $T)
record <$T, $S> AsymmetricPair (first $T, second $S)

where

$T and $S are any valid type

Fields

Name Type Description
first $T First item
second $T, $S Second item

Memory Management

Children are freed when they run out of scope.

Functions

  • func pair(first, second $T) <$T> Pair

    (for backwards compatibility)

    Constructs a Pair.

    [view src]

  • func asymmetricPair(first $T, second $S) <$T, $S> AsymmetricPair

    (for backwards compatibility)

    Constructs an AsymmetricPair.

    [view src]

  • func clone(this *<$T> Pair) <$T> Pair where $T and $S are clonable. (since v2.8)

    Clones an Pair and its elements.

    [view src]

  • func clone(this *<$T, $S> AsymmetricPair) <$T, $S> AsymmetricPair where $T and $S are clonable. (since v2.8)

    Clones an AsymmetricPair and its elements.

    [view src]

Clone this wiki locally