Lazy Sequence의 평가 상태

terminal이 next를 요청할 때 wrapper iterator가 필요한 만큼 계산한다.

1

Defined

source factory와 operation만 저장

평가 0

2

Iterator created

terminal별 새 cursor

재사용 가능

3

Advancing

filter가 후보를 찾고 map 실행

필요량만

4

Terminal complete

cursor 폐기

다음 terminal 새 시작

핵심: lazy와 memoized는 다르며 재실행하면 함수도 다시 호출된다.