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.
1 parent 598f22c commit 93ed81aCopy full SHA for 93ed81a
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