我正在尝试使用给定的原型在 Haskell 中创建此函数:
The function "foldMap Conjoined" over a list of functions returning Bool values
should produce a function over the same input type that returns True if all of
the functions in the list return True for the given input, and False if at
least one of the functions returns False for the given input. (If the list is
empty, then all of the zero functions in the list return True.)>
newtype Conjoined a = Conjoined { getConjoined :: a -> Bool }
deriving Generic
instance Monoid (Conjoined a) where
f <> g = Conjoined (\x -> True)
f <> g 行是我的部分代码的开始。使用该行,该函数通过了关联性测试,但没有产生正确的结果