parallel reduction의 법칙

어느 partition tree에서도 같은 결과가 되기 위한 조건이다.

reduce contract

Identity

빈 부분 결과의 항등원

neutral

Accumulator

element를 부분 결과에 반영

local

Combiner

부분 결과를 결합

associative

Purity

외부 shared state를 바꾸지 않음

stateless

핵심: 뺄셈처럼 괄호 위치에 따라 값이 바뀌는 연산은 병렬 reduce에 사용할 수 없다.