How to use the fluture.Future function in fluture

To help you get started, we’ve selected a few fluture examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github zerobias / telegram-mtproto / packages / telegram-mtproto / src / util / monad-t / index.js View on Github external
export function eitherToFuture(either: Apropos): Fluture {
  return Future((rj, rs) => {
    either.bitap(rj, rs)
  })
}
github zerobias / telegram-mtproto / packages / telegram-mtproto / src / util / folding.js View on Github external
export function FutureFold(
  fn: (rj: (err: Reject) => void,
       rs: (data: Resolve) => void
    ) => ((() => void) | void)
): Fluture, void> {
  const future: Fluture = Future(fn)
  const futureFold: Fluture, void> = folding(future)
  return futureFold
}