What are monoids and how to use them - Scala tutorial

preview_player
Показать описание
This video will introduce you to the Monoid and Semigroup type classes, their powers and rules that they have to obey. You'll see examples of common instances of these type classes as well as some more interesting ones, like the Map monoid. You'll also find out why a single type could have more than one lawful instance of the Monoid type class.

Table of contents:
0:00 - Introduction
0:50 - Definitions of Semigroup and Monoid
5:14 - Example: adding Integers
6:30 - Example: concatenating Strings
7:04 - Example: List monoid
8:31 - Alternative monoids: Product monoid for Int
10:28 - combineAll
11:38 - foldMap
13:35 - More advanced example: Map monoid (accumulating lists of values)
16:28 - Map monoid: grouping list elements by size
17:34 - Map monoid: counting occurences of elements in list
17:58 - Recap: what we learned
18:28 - Sneak peek of the Monoids and Semigroups libraries

Previous videos:

Learn more about:
Рекомендации по теме
Комментарии
Автор

Thank you so much for the video . this is first time, someone has really explained monoids this clearly. Also i would like to see and entire application built in scala, this would be just for reference.

heartlyu
Автор

Very nice video, thanks! What editor are you using?

rsalama
Автор

what vscode extension do you use for this “presentation”?

halyph
Автор

Nice how you do live coding, make more videos.

kovacshuni
Автор

no one javascript guy sets a dislike ;)

mrGrey
visit shbcf.ru