getOrElse
Retrieves a value for set operations and calls the block function for delete and none operations.
set- If the patch is a set, the new value will be returned.delete- If the patch is a delete, block is called with thedeletedparameter set totrue.none- If the patch is none, block is called with thedeletedparameter set tofalse.
The provided block is function that returns Nothing and therefore must throw an exception or some other equivalent operation.
Return
Value depending on the patch operation.
Parameters
block
Function to be called for delete or none operations.