I can't figure out why the third function (i.e. doStuff3
) isn't being called, so the console.log
on fork should print "hello world!!!!"
const
doStuff = () => Future.of(["hello", "world"]),
doStuff2 = (x, y) => Future((resolve, reject) => resolve(`${x} ${y}`)),
doStuff3 = x => Future.of(`${x}!!!!`)
pipeK(doStuff, apply(doStuff2), doStuff3)().fork(console.log, console.error)
You can run it on Ramda REPL
Future doesn't suck like Promise
The broken Promise API allows you to
then
without handling errorsOf course you could
.catch
, but people often forget about that too – Future doesn't have these problems ...Future forces you to specify the error path by making that the first parameter – in both the executor and the
fork
'ing function