Skip to content

Commit e014875

Browse files
uchijoulysses4ever
authored andcommitted
Fix minor typo
1 parent 005ba03 commit e014875

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

markdown/source_md/a-fistful-of-monads.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ class Monad m where
222222
Let's start with the first line.
223223
It says `class Monad m where`.
224224
But wait, didn't we say that monads are just beefed up applicative functors?
225-
Shouldn't there be a class constraint in there along the lines of `class (Applicative m) = > Monad m where` so that a type has to be an applicative functor first before it can be made a monad?
225+
Shouldn't there be a class constraint in there along the lines of `class (Applicative m) => Monad m where` so that a type has to be an applicative functor first before it can be made a monad?
226226
Well, there should, but when Haskell was made, it hadn't occurred to people that applicative functors are a good fit for Haskell so they weren't in there.
227227
But rest assured, every monad is an applicative functor, even if the `Monad` class declaration doesn't say so.
228228

0 commit comments

Comments
 (0)