by chadlavi · 3y ago · 0 comments
const pt: [number, number] = [1, 2]
As for piping functions... that's just how functions work. Not sure what the point of that piping syntactic sugar is.
The pipe came to R a few years back and I would argue that it is one of the best features. I admit that data munging is a very stepwise process but I find myself frequently missing it in Ts when I code. It makes the code denser as you use fewer intermediate variables while the code id still easy to debug.
If I’m solving a math equation, I know that I need to follow the order of operations—I don’t need to rewrite the equation in an entirely new way. It’s more intuitive for me, at least, to wrap my head around the current approach.