Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
(head . map f) xs = (f . head) xs
f が厳密な場合、すべての xs リストで機能します。誰も私に例を挙げてもらえますか? 非厳密な f では機能しないのはなぜですか?
非厳密な関数f = const ()、およびを見てみましょうxs = undefined。この場合、
f = const ()
xs = undefined
map f undefined = undefined
しかし
f undefined = ()
など
(head . map f) undefined = head (map f undefined) = head undefined = undefined
(f . head) undefined = f (head undefined) = f undefined = ()
QED