Categories
Uncategorized

Map, filter, and reduce explained using emoji

Picture showing three functions: 1. the map function taking an array containing the cow face, roasted sweet potato, chicken, and ear of maize emojis and the cook function as its arguments and returning an array containing the cheeseburger, french fries, poultry legs and popcorn emojis; 2. the filter function taking an array containing the cheeseburger, french fries, poultry legs and popcorn emojis and the isVegetarian functions as its arguments and returning an array containing the french fries and popcorn emojis; 3. The reduce function taking an array containing the cheeseburger, french fries, poultry legs and popcorn emojis and the eat function as its arguments and returning the pile of poo emoji as its result.

Click the graphic to see it at full size.

I made the graphic above based on this amazing tweet by Steven Luscher (@steveluscher):

It’s a geeky t-shirt waiting to happen.

10 replies on “Map, filter, and reduce explained using emoji”

Leave a Reply

Your email address will not be published. Required fields are marked *