memoOps function

List<DeltaOp> memoOps(
  1. NodeId node,
  2. IpcValue oldValue,
  3. IpcValue newValue,
  4. List<NodeId> downstream,
)

lean memoOps + theorem equal_memo_suppresses_downstream / changed_memo_publishes_then_invalidates: memo equality suppression. An equal recompute is silent; a changed recompute publishes a DeltaOpSlotValue then invalidates the downstream frontier.

Implementation

List<DeltaOp> memoOps(
  NodeId node,
  IpcValue oldValue,
  IpcValue newValue,
  List<NodeId> downstream,
) {
  if (oldValue == newValue) return const <DeltaOp>[];
  return <DeltaOp>[
    DeltaOpSlotValue(node, newValue),
    ...downstreamInvalidations(downstream),
  ];
}