Okay this is fun. I had a look at Wikipedia article *functor* and was afraid to then watch this video. But having enjoyed and benefitted from other videos you've shared, I worked through this. Pretty sure that I can get this by watching a few more times and writing code following along, grokking all the steps by repeating till the ah~ha arrives. You've done a great job making this approachable. Thank you!
This video has extreme value in that it demonstrates scary FP concepts without using FP syntax. It's extremely easy to see what a "functor" is when you can see it in a language most people already understand. Great job and super high production quality skills; wish my tech videos looked this good. What do you use your graphics and how long does it take to put a video like this together?
Thank you! I'm glad the video was helpful, it takes me a week to write the script, record, and edit the video - i used after effects for the animation and final cut for the editing
This video is invaluable. Thank you for taking your time to explain FP concepts derived from category theory in a demistified, practical and clear way.
You simply and absolutely should have more subscribers, due to this video alone. However, I skimmed through some of your other videos and your videos are immaculately produced and presented. I love to see it! Props & respect!🥰 SUBSCRIBED!!!!!
Really nice explanation. I've played around with Haskell and Elm, but never really got the whole Functor, Applicative, Monad business. Having another crack at it and this video is great
This video was amazing, you totally made the topic more understandable for someone with C#/TS experience wanting to jump to some more functional concepts. Subscribed :)
Hi, Ijemma! Thanks for the content, it's earned my Like. I'd like to add a bit to the 'nestedNumbers' vs 'chainedNumbers': indeed, reading chained map() calls is easier and we can plug in trace/tap() for debugging, and certainly looks better than e(g(f(x))). Luckily, FP gives us one more cool feature - compose(). h = compose(e, g, f) . -> map(h)
Quick question: if I map to a different type, such as going from an array of strings to an array of ints, is it still a functor? If I do ["John", "Mary", "Kate"].map(name => name.length), thus changing the inner type, is it still a functor or a different kind of functor?
Yes. Still a functor. Functors are “structure preserving”, so an array functor has to map to another array functor. And it’s totally fine and used often to change the inner type. What it CAN’T do is return a different type of functor - like a promise, or an option, or a result etc (well, there’s nothing stopping it doing that, but it wouldn’t be a correct functor implementation, and it would be considered a bug)
Functor identity is one of the laws that an object must follow in order to be considered a functor. So a quick way to tell if an object is a functor is to see if it doesn't change in shape or value after its mapping interface has been called on it. A mapping interface would be the strap "map" function or the promise "then" function
It's more like a characteristic of an object that needs to be present in order to be considered a functor. It's like how for a car to be considered a car it needs four wheels, a steering wheel, an engine, etc. There are properties (or satisfied laws) that an object must have to be a functor. This topic me a while to get used to let me know if you have more questions!
I really enjoyed this video for the content but also the production style. What tool do you use for the animated on-screen content if you don't mind me asking?
This is really funny. This explanation of a Functor is really somewhat different from what I have seen from a C++ tutorial. To me it looks like a specific version of it, not the whole story. In that tutorial a functor was explained as an object that behaves like a function. It did this by directly implementing the function call operator, so that it could literally be called as if it where a real function. And ok, I know JS does not have operator overloading, so then it that map method and that then method are ways to replace that. But this is all not the issue. In that C++ explanation they where NOT talking about that whole identity rule, just about composition. They did not require that the created function should return a new data structure or a new functor, but the generated function was just returning a single value like an integer for example. Was that a wrong explanation? I would say, that identity thing is more important for Monads, which are basically very related, but which indeed require both a wrapped type as imput as well as that they return the that wrapped type (arrays or lists are a good example, but the Option and Result types in the Rust language are also great examples of monads). I am really interested in anyones reply on this, learn me more.
Why are you calling a container data structure a functor. This just seems like a ruse for FP people to sound like they are smarter than everyone else. IMHO.
tbh people who use the term casually in everyday technical discussions might be showing off, but there's value knowing vocabulary associated with common data structures
Great explains for begineers. Keep doing with live Example. Thank you a lot
Why on earth does this video have so little views, that was a great explanation!
If I find the devs who didn't watch or +1 this video, they'll have hell to pay. Leave it to me.
Easily the best video I've found on the topic. Significantly better than the others.
So good to finally find an accurate explanation with concrete yet simple examples, thanks!!
glad you enjoyed it!
Congratulations for the clear and easy going explanation! So far the best functor explanation on YT.
This is the by far the best video on functors.
Okay this is fun. I had a look at Wikipedia article *functor* and was afraid to then watch this video.
But having enjoyed and benefitted from other videos you've shared, I worked through this. Pretty sure that I can get this by watching a few more times and writing code following along, grokking all the steps by repeating till the ah~ha arrives. You've done a great job making this approachable. Thank you!
ayye love to hear it, let me know if there's a point in the video you want me to diver deeper into✨
I'm glad I found your channel it's a goldmine
Amazing video ❤, like your style of explanation
this is a very great explanation, thank you!!!
This video has extreme value in that it demonstrates scary FP concepts without using FP syntax. It's extremely easy to see what a "functor" is when you can see it in a language most people already understand. Great job and super high production quality skills; wish my tech videos looked this good. What do you use your graphics and how long does it take to put a video like this together?
Thank you! I'm glad the video was helpful, it takes me a week to write the script, record, and edit the video - i used after effects for the animation and final cut for the editing
This video is invaluable. Thank you for taking your time to explain FP concepts derived from category theory in a demistified, practical and clear way.
Best Functor video. Really simple.
Best explanation after two days searching
The best video that I found about Functors with a great and concise explanation, thank you
Very similar to Brian Lonsdorf content, thank you so much for creating this, clear, concise, and practical!
thank you so much, I'm glad you enjoyed it!
This was great. The best explanation of Functors I've ever heard.
You simply and absolutely should have more subscribers, due to this video alone. However, I skimmed through some of your other videos and your videos are immaculately produced and presented. I love to see it! Props & respect!🥰 SUBSCRIBED!!!!!
Really nice explanation. I've played around with Haskell and Elm, but never really got the whole Functor, Applicative, Monad business. Having another crack at it and this video is great
Coming back to this video to say it is amazing.
Excellent, precious video. Would you be so kind to do one about Monads? Please do one on monads. We desperately need one! Thanks 😃
Amazing content, so clearly conveyed with irrelevance omitted. Love it!
I actually understand now. Brilliant :) ❤
Yo I want a series on fp-ts from you
The video was great and easy to understand
This video was amazing, you totally made the topic more understandable for someone with C#/TS experience wanting to jump to some more functional concepts. Subscribed :)
Thanks so much for this, it was super helpful
Glad it was helpful!
Thanks so much for this video!
This video is SO good
Hi, Ijemma! Thanks for the content, it's earned my Like.
I'd like to add a bit to the 'nestedNumbers' vs 'chainedNumbers': indeed, reading chained map() calls is easier and we can plug in trace/tap() for debugging, and certainly looks better than e(g(f(x))).
Luckily, FP gives us one more cool feature - compose().
h = compose(e, g, f) . -> map(h)
Your channles so usefull and to the point. I love it! Thx for the content. BTW your missing a closeing parenthesis on the example at 3.28
Fantastic video! :) thanks!
Nice topics. Thanks mam
Great content!
Damn, super interesting tutorial!
Very nice lesson!
Quick question: if I map to a different type, such as going from an array of strings to an array of ints, is it still a functor? If I do ["John", "Mary", "Kate"].map(name => name.length), thus changing the inner type, is it still a functor or a different kind of functor?
Yes. Still a functor. Functors are “structure preserving”, so an array functor has to map to another array functor. And it’s totally fine and used often to change the inner type. What it CAN’T do is return a different type of functor - like a promise, or an option, or a result etc (well, there’s nothing stopping it doing that, but it wouldn’t be a correct functor implementation, and it would be considered a bug)
@@madlepthank you so much for taking the time to explain. I really appreciate it! ❤
Awesome content really love it ! ❤️
Nice content!
what is functor identity and what are the use cases?
Functor identity is one of the laws that an object must follow in order to be considered a functor.
So a quick way to tell if an object is a functor is to see if it doesn't change in shape or value after its mapping interface has been called on it. A mapping interface would be the strap "map" function or the promise "then" function
@@IjemmaOnwuzulike thank you very much! are we saying that we only implement identity so it's satisfied a functor? in a real world we don't use it?
It's more like a characteristic of an object that needs to be present in order to be considered a functor.
It's like how for a car to be considered a car it needs four wheels, a steering wheel, an engine, etc. There are properties (or satisfied laws) that an object must have to be a functor.
This topic me a while to get used to let me know if you have more questions!
@@IjemmaOnwuzulike this is all good. Thank you! appreciate it.
Also the other concepts of fp please, like Monads etc.
Especially in the context of Typescript
I really enjoyed this video for the content but also the production style. What tool do you use for the animated on-screen content if you don't mind me asking?
this is so cool
Functors are funky
damn great video
love it!
This is really funny. This explanation of a Functor is really somewhat different from what I have seen from a C++ tutorial. To me it looks like a specific version of it, not the whole story.
In that tutorial a functor was explained as an object that behaves like a function. It did this by directly implementing the function call operator, so that it could literally be called as if it where a real function. And ok, I know JS does not have operator overloading, so then it that map method and that then method are ways to replace that. But this is all not the issue.
In that C++ explanation they where NOT talking about that whole identity rule, just about composition. They did not require that the created function should return a new data structure or a new functor, but the generated function was just returning a single value like an integer for example. Was that a wrong explanation?
I would say, that identity thing is more important for Monads, which are basically very related, but which indeed require both a wrapped type as imput as well as that they return the that wrapped type (arrays or lists are a good example, but the Option and Result types in the Rust language are also great examples of monads).
I am really interested in anyones reply on this, learn me more.
more videos about applicative functor
these animations!! yes!!!!
ahhh tysm 😭✨
I too wanna say howdy to Don, Ramy, and Chadwick--Ijemma knows what's up
wtf, insta sub!
Calling this a functor is the silliest thing I’ve ever heard in my life
Why are you calling a container data structure a functor. This just seems like a ruse for FP people to sound like they are smarter than everyone else. IMHO.
tbh people who use the term casually in everyday technical discussions might be showing off, but there's value knowing vocabulary associated with common data structures