2
在this question中,作者在Haskell中編寫了de Morgan原則的實現。我理解的notAandnotB
,並notAornotB
的實現,但我努力理解的notAorB
執行當中是:德摩根法律實施中的Haskell點(。)算子
notAorB :: (Either a b -> c) -> (a -> c, b -> c)
notAorB f = (f . Left, f . Right)
有人能解釋如何(f . Left, f . Right)
部分作品?我見過以前使用的.
運算符,但有三個參數,而不是兩個。
預先感謝您。
完美;感謝您的幫助! – helencrump