The Strange Case Of Mapping Over Optionals

Greg Heo with a post looking at how map and flatMap work when applied to optionals. Greg first looks at how traditional map and flatMap work when applied to collections, before taking a look at optionals. He provides code snippets of their Optional implementations, and offers guidance on when to use map and flatMap based on our requirements.