revisiting lists are monoid in haskell
very simple
#ormolu doesn't like multiline html
-- loginPage :: LBS.ByteString
-- loginPage = "<html><body>\
-- \<h3>Login with Mastodon</h3>\
-- \<a href='/start'>Log in with Mastodon via OAuth</a>\
-- \</body></html>"
so you can write it as
loginPage :: LBS.ByteString
loginPage = "<html><body>\n<h3>Login with Mastodon</h3>\n<a href='/start'>Log in with Mastodon via OAuth</a>\n</body></html>"
or concat the list of these lines associatively as concat is in #haskell
ofc with overloaded strings
loginPage =
"<html><body>\n" <>
"<h3>Login with Mastodon</h3>\n" <>
"<a href='/start'>Log in with Mastodon via OAuth</a>\n" <>
"</body></html>"
his relates to #monoids because string concatenation (using ++ for lists or + for strings) is an associative binary operation with an identity element (the empty string), thus forming a monoid structure.
sidenote -- you can also do it with Data.Text.Lazy but that's besides the point
Dailymotion

This is the next entry in the Late Bloomers playlist everyone! This one reached 100 views recently and it stood for a while time in the Rookies playlist. Only later people found the video interesting. Thank you! #monads #monoids #functors #kotlin #haskell

https://www.youtube.com/watch?v=_NVWfjI_LjM

And the right identity theory of the Monad?? Please!!! #jesprotech #monad #laws #lecture #coding

YouTube
My new video about functors, monoids and monads everyone! Watch for free on JESPROTECH. #functor #monads #monoids #haskell #kotlin https://www.youtube.com/watch?v=ShGAN0dguUg&si=gcV2XlRvZE3OTXTZ
Monads are no Nomads! - Basics Unlocked - Challenge unlocked

YouTube

One more addition to "Monads are no Nomads" compilation everyone! Still checking functors on it but the next videos will be the last about talking over this subject. Then we will move on to #Monoids! Enjoying the channel so far? Plz help it by subscribing:

https://www.youtube.com/shorts/MxYB-RvZWVs

A mapTree or a tree map? I don’t know no functor!!!!!! #jesprotech #haskell #functor #code #coding

YouTube
Steven Schwarz: in their own language (2024)

YouTube
Steven Schwarz: sand-grain worlds III (2024)

YouTube
Steven Schwarz: sand-grain worlds II (2024)

YouTube
Steven Schwarz: sand-grain worlds (2024)

YouTube

We have released a new CppCon 2023 Video!

C++23: An Overview of Almost All New and Updated Features – Marc Gregoire – CppCon 2023
https://youtu.be/Cttb8vMuq-Y
#BestPractices #Containers #Coroutines #cpp #cpp20 #cpp23 #cppBasics #ErrorHandling #Generators #HowTo #Libraries #Modules #Monads #Monoids #Objects #Ranges #StandardLibrary

C++23: An Overview of Almost All New and Updated Features - Marc Gregoire - CppCon 2023

YouTube