andThen과 compose의 적용 방향

같은 두 function도 결합 method에 따라 실행 순서가 달라진다.

first.andThen(second)

first를 적용하고 결과에 second를 적용한다

left to right

first.compose(before)

before를 적용한 뒤 first를 적용한다

inside first
읽기 전략domain 이름과 representative input으로 중간 결과를 확인한다

핵심: 순서를 잘못 이해하면 type은 맞아도 business result가 달라진다.