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 c3ea025 + 93ed81a commit d5fbf11Copy full SHA for d5fbf11
Haskell/maybe3.hs
@@ -16,7 +16,7 @@ instance Applicative Maybe where
16
Nothing <*> _ = Nothing
17
18
main = do
19
- let a = Just 5
20
- b = Just $ (* 2) . (+ 5) . (^ 2)
21
- c = b <*> a
22
- print c
+ print $ (*) <$> Nothing <*> Nothing
+ print $ (*) <$> Nothing <*> Just 2
+ print $ (*) <$> Just 3 <*> Nothing
+ print $ (*) <$> Just 3 <*> Just 2
0 commit comments