This all goes to how hard code reuse is - is it worth having two very similar functions that do the same thing instead of having one function that's DRY but more complex than both.
Maybe you should have a shared function that has the similar bits of both but then when you remove pieces you have this added complexity.
Everyone can give you arguments either way...
I remember reading this beautiful explanation about an idea for a functional language where you simply install collections of methods that do specific things and each method you install should be as simple as possible and do just one thing etc. - maybe it was somewhere on the Elixir mailing lists but I can't find it!
Maybe you should have a shared function that has the similar bits of both but then when you remove pieces you have this added complexity.
Everyone can give you arguments either way...
I remember reading this beautiful explanation about an idea for a functional language where you simply install collections of methods that do specific things and each method you install should be as simple as possible and do just one thing etc. - maybe it was somewhere on the Elixir mailing lists but I can't find it!