Executes a given callback function while preserving its reference and memoizing it with specified dependencies.
Type of the callback function
The callback function to be executed
Optional
The dependencies to be memoized
Executes a given callback function while preserving its reference and memoizing it with specified dependencies.