Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 5. Working with Blocks > Working with Common Block Design Patterns

5.4. Working with Common Block Design Patterns

I showed you how you can use blocks with GCD to dispatch units of work to threads. Now take a look at some other common block patterns. In these cases, there are examples of where you might use blocks with standard framework APIs to do things a bit more efficiently or cleanly than you would be able to do them without blocks.

5.4.1. Using code blocks for maps

A common operation that is used to demonstrate the power of blocks in other languages is in implementing a map algorithm.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint