Almost everything a programmer needs to know about Category Theory, and nothing she doesn't. 😸 A great introduction in ms. Sfregola's trademark "extremely non-intimidating" style. Chances are, in a few years I won't remember Bartosz's or Lawvere & Schanuel's definitions of a monad, but I don't think I'll ever forget that "a monad is simply something that smashes boxes together" - like I'm never forgetting "the pizza symbol" |@| from ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-P8nGAo3Jp-Q.html 😀 A great talk, thanks!
you'll find that the deeper you go into category theory, those definitions are the only ones that count - in my discussions with various people about various topics, nobody tried to make such parallels - they only work for beginners as a way of making them appealing - going the route of "smashing boxes together" goes against what this style is trying to enforce - and that is mathematical rigorousness. If you don't plan to go deeper down the rabbit hole, remembering as a way of "smashing boxes together" is fine though, but inefficient in building anything significant.
Great talk. It's not easy to explain such abstractness. Clearly lots of effort, struggle and thought went into this distillation. Really helped improve my intuition for functors, applicatives, monoids and monads -- cheers!
At around 41.12, about applicatives. Why does the pure function accept the function f? If the function f is evaluated, it returns a B, but the ab function signature accepts a box with a function a->b..... much appreciated for an answer. Thnx.
its the reference towards that function - so pure evaluates it as Applicative[A => B] Remember, in order to be able to call f, you need to pass in an A to it f(a) . It is a special case when some f doesnt have any arguments or are ignored when simply typing f calls the function => f: => B for example.
dumb question: the initial arrow diagram shows identity as being A ---id---> A. I would assume the function id is of arity 1. Why is it that the scala function identity takes no arguments?
To see associativity there has to be 3 mappings at least. Here there is only 2 ("sizeOf" and "biggerThan2"). Maybe add from Person to Person's fullName with mapping "fullName" that gives String.
Can you watch this video" ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-p54Hd7AmVFU.html . It may give clearer picture about compositions and associativity.