Skip to content

Conversation

BenBals
Copy link

@BenBals BenBals commented Oct 9, 2019

I think the main aspect of typeclasses is defining common behavior for a set of types. In this playful example we have a set of character type belonging to the class Playable. Players have a healing power so the class reflects that. The example illustrates that the class instances can work differently from each other (warriors have a constant healing power, mages not).

I hope you like the example.

In reference to issue #10.

@BenBals BenBals changed the title Type classes (#10) Type classes Oct 9, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant