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.
Also, in Rimmel.js we created the reverse pipe, which is the same as above, except you use it to feed the input of an observer, rather than the output of an observable. We use it extensively to create event adapters for UI streams.
Whether any of this could be useful for stuff like the LazyPromise I'm not sure yet, just sharing for inspo
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.
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.There is an equivalent
pipe()function but for streams in RxJS: rxjs.dev/api/index/function/pipe (awful doc, don't read it)Essentially, it enables you to do this:
Also, in Rimmel.js we created the reverse pipe, which is the same as above, except you use it to feed the input of an observer, rather than the output of an observable. We use it extensively to create event adapters for UI streams.
Whether any of this could be useful for stuff like the LazyPromise I'm not sure yet, just sharing for inspo