Skip to content

Help understanding type signature of flatMap in section 6.1? #84

Answered by soupi
yousefmoazzam asked this question in Q&A
Discussion options

You must be logged in to vote

No, you are right. The text is wrong. This should be as you said:

flatMap :: (a -> Either e b) -> Either e a -> Either e b
flatMap func val = flatten (fmap func val)

Thanks for spotting and reporting. Will fix this momentarily.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@yousefmoazzam
Comment options

Answer selected by yousefmoazzam
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants