mirror of
https://github.com/github/semantic.git
synced 2024-12-23 06:41:45 +03:00
Give a default definition for <&> in terms of liftC2.
This commit is contained in:
parent
2119f3b7ed
commit
9ba51f537a
@ -6,6 +6,7 @@ infixl 4 <&>
|
||||
|
||||
class Alternative f => Conjunctive f where
|
||||
(<&>) :: f (a -> b) -> f a -> f b
|
||||
f <&> a = liftC2 ($) f a
|
||||
|
||||
liftC2 :: (a -> b -> c) -> f a -> f b -> f c
|
||||
liftC2 f a b = f <$> a <*> b
|
||||
|
Loading…
Reference in New Issue
Block a user