Here's something I read in a tweet by @steveluscher a while back.
map([🌽, 🐮, 🐔], cook)
=> [🍿, 🍔, 🍳]
filter([🍿, 🍔, 🍳], isVegetarian)
=> [🍿, 🍳]
reduce([🍿, 🍳], eat)
=> 💩
Wonderful illustration of how these higher order functions for functional programming work.
PS: I mentioned in last week's issue about iOS Conf SG. The video of my talk is now available here. There are gems in the conference such as Leveraging Swift's Type System by @benjaminencz. There are many others. Check out all the talks here.
Your feedback is valuable: Do you want more nuggets like this? Yes or No
.
.