적용을 주목해서 보면
a->b, b->c 합성의 구현은 a에 a->b를 적용 $의 체이닝으로 볼 수 있다.
b->c $ a->b $ id a

λ> (+1) $ (+2) $ 3

a->mb, b->mc 합성은 ma에 a->mb를 적용 >>=의 체이닝
return a >>= a->mb >>= b->mc

λ> Just 3 >>= (\x -> Just (x+1)) >>= (\x -> Just (x+2))

wa->b, wb->c 합성은 wa->b를 wa에 적용 extend의 체이닝
wb->c extend (wa->b extend duplicate wa)

λ> (\(Identity x) -> x+1) `extend` (\(Identity x) -> x+2) (duplicate (Identity 3))

이런 눈으로 보면, Functor 적용 <$>, Applicatives 적용<*>(이 둘은 다른 결에 있긴 하지만) 등 이 덜 낯설게 보인다.
(코모나드 정리 노트 중 일부입니다.)

0

If you have a fediverse account, you can reply to this note from your own instance. Search https://hackers.pub/ap/notes/019656dc-e7a8-719f-8e73-58d5b9ae68ce on your instance and reply to it.