Sollicitatievraag bij ESPN

Design a block function that returns an array and Bool.

Antwoord op sollicitatievraag

Anoniem

24 jan 2013

Blocks are a relatively recent introduction (2010?) to the world of Objective C. Like declared functions in most other languages, a block function can only return one "thing" (or object). To get both an array and BOOL out of a block, you can either declare "__block" variables that can be passed in and modified from within the block, or you can return some Objective C object that contains both the array and BOOL.