From 8382dc2b20b6a5663da09783a5ce6c436fafdf16 Mon Sep 17 00:00:00 2001 From: Mikhalkovich Stanislav Date: Tue, 4 Apr 2023 10:29:56 +0300 Subject: [PATCH] a.Cartesian(n) -> a.CartesianPower(n) --- bin/Lib/PABCSystem.pas | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/bin/Lib/PABCSystem.pas b/bin/Lib/PABCSystem.pas index 38b21e352..0ada09556 100644 --- a/bin/Lib/PABCSystem.pas +++ b/bin/Lib/PABCSystem.pas @@ -12182,7 +12182,7 @@ begin end; /// Возвращает n-тую декартову степень множества элементов, заданного массивом -function Cartesian(Self: array of T; n: integer): sequence of array of T; extensionmethod; +function CartesianPower(Self: array of T; n: integer): sequence of array of T; extensionmethod; begin var r := new integer[n]; var ar1 := new T[n]; @@ -12211,7 +12211,16 @@ begin end; end; +///-- +function Cartesian(Self: array of T; n: integer): sequence of array of T; extensionmethod := Self.CartesianPower(n); + /// Возвращает n-тую декартову степень множества элементов, заданного последовательностью +function CartesianPower(Self: sequence of T; n: integer): sequence of array of T; extensionmethod; +begin + Result := Self.ToArray.Cartesian(n); +end; + +///-- function Cartesian(Self: sequence of T; n: integer): sequence of array of T; extensionmethod; begin Result := Self.ToArray.Cartesian(n);