by bhouston · 5mo ago · 0 comments
So code duplication because of abstraction issues is rare. Code duplication because of siloed developers is so much more common.
> but since moving pretty much to a purely functional approach
What language?But I'm probably overthinking it.
At least that's my interpretation
Basically since moving to a functional approach in typescript I find I do not fight abstractions as I used to when I used classes and inheritance.
using projection you can "call a function in two parts"
add: {x+y}
add4: add[4] / gives {4+x} by fixing 4 as first argument to {x+y}
add4[2] / gives 6
this is a useful pattern that you can use to first 'fix' data or behaviour
to produce another function