Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add exercises for Monoid (and maybe Semigroup) #363

Open
gwils opened this issue Jul 29, 2019 · 2 comments
Open

Add exercises for Monoid (and maybe Semigroup) #363

gwils opened this issue Jul 29, 2019 · 2 comments

Comments

@gwils
Copy link
Collaborator

gwils commented Jul 29, 2019

Monoid is perhaps the most core and widespread type class which is currently missing from the course. A module should be added on it.

Perhaps we should also add a module on Semigroup, in which case we should add NonEmptyList to differentiate them. If we do this, we should change the some exercise in the alternative module to return NonEmpty

Discussion point: Should we first introduce Semigroup then Monoid, following the hierarchy? I think it might be more enlightening to teach Monoid first - the more key abstraction - and then move on to Semigroup to answer the question "what happens without mempty".

@puffnfresh
Copy link
Contributor

I think you could argue either direction but I'm probably on the side of Semigroup first, for the same reason as Functor first, not Monad.

@endgame
Copy link
Collaborator

endgame commented Jul 30, 2019

HPFFP does Monoid first, but I'm not especially fussed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants