What do people think of fp-ts?
pipe(
decoder.decode(req.body)
, E.mapLeft(_ex => new InputValidationError(decoder.decode(req.body)))
, RTE.fromEither
, RTE.chain(handleInput)
, RTE.match(
error => {
res.status(500);
res.send(error)
},
result => {
res.send(result)
}
)
)(reader)But it defines its pipe function the same way RXJS does, separately for any number of arguments:
function pipe<A>(a: A): A
function pipe<A, B>(a: A, ab: (a: A) => B): B
function pipe<A, B, C>(a: A, ab: (a: A) => B, bc: (b: B) => C): C
function pipe<A, B, C, D>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D): D
...
https://github.com/gcanti/fp-ts/blob/master/src/function.ts#...What’s the issue? This has been a common way to do this sort of thing since C++ template meta programming. Have you honestly ever broke the bounds?