Skip to content
0:00 / 0:00

#monoids#semigroups#haskell

Julie Moronuki: Introduction to Monoids

Bay Area Haskell

681 subscribers • 5 videos on Hallway

YouTube
  • Recommended by 1 person: 1 in engineering communities.
  • Presented by Julie Moronuki
  • Linked in the descriptionGinBaby/talks

Beginner. No background in the topic needed.

2.8K views9 years ago1 recommendation

Programming languagesComputer scienceHaskellFunctional programming

Julie Moronuki introduces the mathematical and programming concepts of monoids and semigroups using Haskell.

Presented at BayHac 2017 wiki.haskell.org/BayHac2017 Outline: github.com/GinBaby/talks/blob/master/semigroups.md Applicatives are Monoidal argumatronic.com/posts/2017-03-08-applicative-instances.html

Why it's here

1 person recommends this

What people say. Recommended as a very clear and accessible introduction to monoids for beginners.

u/cocreaturein r/haskell • Recommends

BayHac 2017 recordings

u/Iceland_jackin r/haskell • Mentions

On “BayHac 2017 recordings”

Julie's long awaited monoid/semigroup talk :) `minimum` (as discussed) doesn't quite belong in `Foldable` but rather `Foldable1` (subclass of `Foldable` for non-empty structures): -- Data.Foldable class Foldable (t :: Type -> Type) where fold :: Monoid m => t m -> m foldMap :: Monoid m => (a -> m) -> (t a -> m) -- Data.Semigroup.Foldable class Foldable t => Foldable1 (t :: Type -> Type) where fold1 :: Semigroup m => t m -> m foldMap1 :: Semigroup m => (a -> m) -> (t a -> m) Using `foldMap1` we can define a `minimum1` that cannot be applied to empty structures {-# Language InstanceSigs #-} newtype Min a = Min { getMin :: a }…