Created
February 21, 2022 11:34
-
-
Save exuanbo/4b6997f5903b73c38de7bd0c5aa81d8b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const tap = | |
<T>(fn: (arg: T) => void) => | |
(arg: T): T => { | |
fn(arg) | |
return arg | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment