【发布时间】:2017-05-29 21:08:52
【问题描述】:
在this question,作者在 Haskell 中编写了德摩根定律的实现。我了解notAandnotB 和notAornotB 的实现,但我很难理解notAorB 的实现,即:
notAorB :: (Either a b -> c) -> (a -> c, b -> c)
notAorB f = (f . Left, f . Right)
有人能解释一下(f . Left, f . Right) 部分的工作原理吗?我以前见过. 运算符,但它有三个参数,而不是两个。
提前谢谢你。
【问题讨论】:
标签: haskell demorgans-law dot-operator