rosavox/lib/alveolata/structures/pair/functions.php

58 lines
696 B
PHP
Raw Normal View History

2025-05-23 07:33:29 +00:00
<?php
namespace alveolata\structures;
/**
* @template type_first
* @template type_second
*/
class struct_subject_pair
{
/**
* @var type_first
*/
public $first;
/**
* @var type_second
*/
public $second;
/**
* @param type_first $first
* @param type_second $second
*/
public function __construct($first, $second) {
$this->first = $first;
$this->second = $second;
}
}
/**
* @template type_first
* @template type_second
* @param type_first $first
* @param type_second $second
* @return struct_subject_pair<type_first,type_second>
*/
function pair_make(
$first,
$second
) {
return (
new struct_subject_pair(
$first,
$second
)
);
}
?>