Closed pringscreem closed 2 months ago
Write some paper notes for this.
Just use the function pointer at the lowest point possible, to eliminate as much duplicate code as possible (the price is that one of the functions that gets swapped in--helper functions--is just a dummy function).
Re-write the new function design using function pointers so that it can decide which helper function to call in the while-loop without having to go through the chain of if-else statements in each while-loop iteration.
This means researching function pointers (mostly syntax).