This presentation was recorded at YOW! 2016. #GOTOcon #YOW https://yowcon.com George Wilson - Enthusiastic Functional Programmer at PaidRight RESOURCES https://github.com/gwils https://wils.online https://www.linkedin.com/in/george-wilson-49a54457 ABSTRACT Functional programmers love to steal ideas from mathematics. Perhaps the best example of this is the venerable monoid, a concept from abstract algebra. But what about other algebraic structures? Semigroups and semilattices, related to monoids and beloved by mathematicians, are also ripe for use by programmers. We will explore these abstractions, their uses, and familiar concretions that fit. We’ll also look at the trade-off that helps us choose which is the right algebraic structure for the job. [...] TIMECODES 0:00 Introduction 0:37 Monoid typeclass 1:28 Example: Numbers under addition 2:07 Example: Functions 3:12 Foldable example: List 3:18 Foldable example: Maybe 3:31 Laws are important 4:38 Example: NonEmpty Lists 5:51 Example: Positive Integers 6:29 Introducing Semigroup 6:58 Semigroup instances 7:08 Every Monoid is a Semigroup 8:23 Why not Foldable? 8:57 Some Foldables... 11:18 Promoting Semigroups 14:09 Example: Maximum 14:48 What can we do with a semilattice? 15:34 Laws = power 16:10 Idempotence 16:38 CRDTs 18:13 Bounded Join-semilattice 18:44 Example: Set union laws 20:27 Wrapping up RECOMMENDED BOOKS Eric Normand • Grokking Simplicity • https://amzn.to/3gz7o3C Daniel Higginbotham • Clojure for the Brave and True • https://amzn.to/38tZjsF Ulisses Almeida • Learn Functional Programming with Elixir • https://amzn.to/389grn6 Neal Ford • Functional Thinking • https://amzn.to/3DdP35B Petricek & Skeet • Real-World Functional Programming • https://amzn.to/38diF4M Venkat Subramaniam • Functional Programming in Java • https://amzn.to/2WlOXIt Cristian Salcescu • Functional Programming in JavaScript • https://amzn.to/3y75jBS Richard Feldman • Elm in Action • https://amzn.to/387kujI Jeremy Fairbank • Programming Elm • https://amzn.to/2WhZCE8 Wolfgang Loder • Web Applications with Elm • https://amzn.to/3jblQ3q https://bsky.app/profile/gotocon.com https://twitter.com/GOTOcon https://www.linkedin.com/company/goto- https://www.instagram.com/goto_con https://www.facebook.com/GOTOConferences #Haskell #Algebra #FunctionalProgramming #Programming #Coding #FunctionalTraining #GeorgeWilson #Functional #HaskellTutorial #YOWcon CHANNEL MEMBERSHIP BONUS Join this channel to get early access to videos & other perks: https://www.youtube.com/channel/UCs_tLP3AiwYKwdUHpltJPuA/join Looking for a unique learning experience? Attend the next GOTO conference near you! Get your ticket at https://gotopia.tech Sign up for updates and specials at https://gotopia.tech/newsletter SUBSCRIBE TO OUR CHANNEL - new videos posted almost daily. https://www.youtube.com/user/GotoConferences/?sub_confirmation=1
Get notified about new features and conference additions.