diff --git a/rainbowadn/flow/core/_purereduce.py b/rainbowadn/flow/core/_purereduce.py index 7d42160..41b3d16 100644 --- a/rainbowadn/flow/core/_purereduce.py +++ b/rainbowadn/flow/core/_purereduce.py @@ -12,7 +12,10 @@ class PureReduce(Reduce[Pure, Pure], Generic[Pure]): super().__init__(initial) async def reduce(self, out: Pure, element: Pure) -> Pure: - return self.merge(out, element) + return self.pure(out, element) def merge(self, left: Pure, right: Pure) -> Pure: + return self.pure(left, right) + + def pure(self, left: Pure, right: Pure) -> Pure: raise NotImplementedError diff --git a/rainbowadn/flow/verification/core/_verifyreduce.py b/rainbowadn/flow/verification/core/_verifyreduce.py index ead33a1..c677dac 100644 --- a/rainbowadn/flow/verification/core/_verifyreduce.py +++ b/rainbowadn/flow/verification/core/_verifyreduce.py @@ -8,7 +8,7 @@ class VerifyReduce(PureReduce[bool]): def __init__(self): super().__init__(True) - def merge(self, left: bool, right: bool) -> bool: + def pure(self, left: bool, right: bool) -> bool: assert_true(left) assert_true(right) return True diff --git a/rainbowadn/flow13/_binaryflow.py b/rainbowadn/flow13/_binaryflow.py index 18bf6ea..4a8e593 100644 --- a/rainbowadn/flow13/_binaryflow.py +++ b/rainbowadn/flow13/_binaryflow.py @@ -194,7 +194,7 @@ class VerifySubsetAction( class VerifySubsetReduce( PureReduce[CheckResult] ): - def merge(self, left: CheckResult, right: CheckResult) -> CheckResult: + def pure(self, left: CheckResult, right: CheckResult) -> CheckResult: return max(left, right) def loose(self) -> Reduce[CheckResult, CheckResult]: diff --git a/rainbowadn/flow13/_flowcheque.py b/rainbowadn/flow13/_flowcheque.py index 456619e..99e0db4 100644 --- a/rainbowadn/flow13/_flowcheque.py +++ b/rainbowadn/flow13/_flowcheque.py @@ -16,7 +16,7 @@ __all__ = ('FlowCheque',) class SumReduce(PureReduce[int]): - def merge(self, left: int, right: int) -> int: + def pure(self, left: int, right: int) -> int: return left + right