R decorator to change both input and output
问题 I am trying to refactor this. In Python, I would use a decorator. What's the 'R'tful way to do this? Say, we have this pattern good_input <- format_input( bad_input ) bad_output <- use_this_func( good_input ) good_output <- format_output( bad_output ) And then again, good_input <- format_input( bad_input ) bad_output <- use_this_other_func( good_input ) good_output <- format_output( bad_output ) As you can imagine, this proliferates like wild mushroom. I want something close to this solution