JSFoo Pune 2019

JSFoo Pune 2019

JSFoo is a JavaScript conference hosted by HasGeek.

Rakesh Pai

@rakeshpai

Array.map is more interesting than you probably think!

Submitted Dec 11, 2018

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.

Outline

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.

Speaker bio

I <3 JS. :)

I’ve been doing JS since before IE6 was even released. Also, I run https://errorception.com/.

Comments

{{ gettext('Login to leave a comment') }}

{{ gettext('Post a comment…') }}
{{ gettext('New comment') }}
{{ formTitle }}

{{ errorMsg }}

{{ gettext('No comments posted yet') }}

Hosted by

JSFoo is a forum for discussing UI engineering; fullstack development; web applications engineering, performance, security and design; accessibility; and latest developments in #JavaScript. Follow JSFoo on Twitter more