Run a callable on each item of a collection
Summary:
MultipleOperation is a wrapper to apply a callable,
and consolidate the boolean result.
This works like a foreach loop or functions like array_walk, iterator_apply,
with the difference it tries to still apply the callable on failure, and
report failure afterwards.
Use case: PSR-16 cache allows to delete several keys,
we can return true if all has been deleted and false
if at least one operation failed.
Test Plan:
Units tests provided.
Tested in keruald/cache draft implementation.
Reviewers: dereckson
Differential Revision: https://devcentral.nasqueron.org/D3229