Refactoring Similar Functions to Reduce Repetition in TypeScript
Hey all,
I have these two relatively simple functions:
As you can see they are somewhat similar, both having a pipe() and passing leftList as a first value. I was trying to play around with ways to make this less repetitive but wasn't able to find a solution that works myself. Any ideas would be appreciated!
I have these two relatively simple functions:
As you can see they are somewhat similar, both having a pipe() and passing leftList as a first value. I was trying to play around with ways to make this less repetitive but wasn't able to find a solution that works myself. Any ideas would be appreciated!
