I need to have a possibility to write:
//if someCase1
block1(block2(block3()))
//if someCase2
block1(block3())
//if someCase3
block2(block3())
where blocks are some blocks of code. I saw a lot of examples but no one describes how to declare chaining and nullable blocks simultaneously (it seems nullable
is required for this case).
How to solve this issue? Both Swift and Objective-C solutions are applicable.