also half the advanced things your can get a hint from #ormolu
is reading random blogs or watching a ton of vids to learn #haskell even necessary
But than again that's not what we re taught in cs101
If I were to teach someone conceptually *motivated, can wait 2 yrs to get a job* a PL ( including my 15 yo self) d tell them to 1st master the editor and OS #linux ofc, then fork the lengthiest code of what they d like build features for and start from there.
Refer to a #textbook as and when you need
-- non cse , dropout
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