포인트프리로 가버렷!
-- zip =<< tail == x -> zip (tail x) x
differences = fmap (uncurry (-)) . (zip =<< tail)
-- differences [1,3,5,7,9] == [2,2,2,2]
-- zip =<< tail == x -> zip (tail x) x
differences = fmap (uncurry (-)) . (zip =<< tail)
-- differences [1,3,5,7,9] == [2,2,2,2]
이게 본질적으로 Reader 모나드랑 동작이 같음
가만 생각해보면 또 맞아서 신박함
ㄴ 오홍 그렇네... 재밌다 범주론 공부해야 하나
범주론은 모르겠고 그래서 함수 여러개 모나드로 묶어서 호출하면 기분 째짐