Optimizing Function Calls: Implementing Memoization and Deduplication

I have a function that I want to memoize / deduplicate calls to it and save the result for the same parameters.
so function fn(input: string): Effect<string> - 1) how can I make it run just one at a time and 2) how can I easiest memoize the result?
Was this page helpful?