@domatdo도막도 그리고
force . thunk
는 항등사상이 맞습니다. M
은 M
이라는 계산을 하는 녀석이고, force (thunk (M))
도 정확히 M
이라는 계산을 하는 녀석이죠.
@ailrunAilrun (UTC-5/-4) 아, thunk . force라고 해야 했는데 force . thunk라 했네요..! 그리고 다시 생각하니 thunk . force도 항등 사상이 맞군요…
If you have a fediverse account, you can reply to this note from your own instance. Search https://hackers.pub/ap/notes/01963f75-6806-7f16-af7d-ca4faba1db06 on your instance and reply to it.
@domatdo도막도
thunk . force
가 좀 난해한 녀석이죠. thunk
를 LISP의 quasi quotation으로, force
를 back quotation으로 이해하면 thunk . force
는 항등입니다만, thunk
를 그냥 지연된 계산으로 이해하면 thunk (M)
은 지연된 M
계산이고 thunk (force (thunk (M)))
은 지연된 force (thunk (M))
계산이라 같다고 하기 미묘합니다. 이 맥락에서 같다는 두 프로그램이 실행되어서 문법적으로 동일한 결과 값을 준다는 이야기일 때요.