We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 70bd2c3 + 26cc98f commit 0e8a64dCopy full SHA for 0e8a64d
src/Control/Comonad/Cofree.purs
@@ -152,11 +152,8 @@ instance extendCofree :: Functor f => Extend (Cofree f) where
152
instance comonadCofree :: Functor f => Comonad (Cofree f) where
153
extract = head
154
155
-instance applyCofree :: Apply f => Apply (Cofree f) where
156
- apply f x = mkCofree h t
157
- where
158
- h = (head f) (head x)
159
- t = apply <$> (tail f) <*> (tail x)
+instance applyCofree :: Alternative f => Apply (Cofree f) where
+ apply = ap
160
161
instance applicativeCofree :: Alternative f => Applicative (Cofree f) where
162
pure a = mkCofree a empty
0 commit comments