UniCoreFW

tap()

Invoke func with the value and then return value.

Implementation

Args: value: The value to pass to func and return func: A function to call with value Returns: The original value

Example

tap(42, print)

Expected output: 42

Source Code

def tap(value: T, func: Callable[[T], Any]) -> T: func(value) return value