Compose is similar to pipe but you don't pass a value at the front so the result is another function, not a value. It's for combining small functions into more complicated functions that you can call later. Check out flow in fp-ts for some examples.
Oh I see - I talk a little bit about this function in the first section where I call it ltrCompose. It might well be a good option for folks who use fp-ts or Ramda, but personally I've moved away from it.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
The pipe() function that I'm talking about is the one that lets you replace b(a(x)) with pipe(x, a, b)
I don't think that is exact to pipe, If you just want to replace the b(a(x)), I think
compose pattern
is closer and exacter for it.Could you tell a bit more about what you mean by "compose pattern"?
Compose is similar to pipe but you don't pass a value at the front so the result is another function, not a value. It's for combining small functions into more complicated functions that you can call later. Check out flow in fp-ts for some examples.
Oh I see - I talk a little bit about this function in the first section where I call it
ltrCompose
. It might well be a good option for folks who use fp-ts or Ramda, but personally I've moved away from it.