Array.map is more interesting than you probably think!
Submitted by Rakesh Pai (@rakeshpai) on Tuesday, 11 December 2018
Section: Full talk Technical level: Intermediate Status: Confirmed & Scheduled
You probably already know about JS’s Array.map, and you probably use it everyday. However, there’s a more fundamental, more beautiful thing happening with Array.map that you’ve surely noticed, but might not have thought deeply about. This live-coding talk will explore what we can learn from Array.map, to help us build better, more reliable, bug-free programs.
You’ll leave this talk understanding what all the fuss about ‘functors’ and ‘monads’ is about, why they’re awesome, and how it’ll help you write more reliable apps. Don’t be scared of words like ‘functors’ and ‘monads’ - I’ll show you how you’ve already been using them for a long time without even realising it.
We’ll be getting pretty deep into the weeds of Functional Programming, so it’ll help to be comfortable with JS. No library or framework knowledge needed.
This is a live-coding talk. Slides will be minimal, if any.
The talk will explore Array.map’s behaviour. I’ll try to get at the essence of what it means to map over something, and arrive at a definition of what mappable objects are.
I’ll then deep-dive into what it means to map over empty arrays (!!!), and how that has very interesting and useful behaviour. I’ll expand on this behaviour at length, showing a way to write reliable error-free programs. Along the way, we’ll discover monads and functors, and why they’re so interesting and fun to work with.
I <3 JS. :)
I’ve been doing JS since before IE6 was even released. Also, I run https://errorception.com/.