Skip to content

Instantly share code, notes, and snippets.

@tomruttle
tomruttle / introduction.md
Last active October 6, 2018 20:43
Introduction

Hi.

This is just some brief placeholder text to put on the homepage of my domain.

If you want to contact me, I'm @tomruttle most places on the web, and you can reach me by email here @ tom.

Actual homepage content may or may not be forthcoming...

🦔

@tomruttle
tomruttle / promise-serial.js
Created August 10, 2018 12:13
promise serial
// @flow
function promiseSerial<T: mixed>(funcs: Array<() => Promise<T>>): Promise<Array<T>> {
return funcs.reduce(async (promise, func) => {
const [result, funcResult] = await Promise.all([promise, func()]);
return [...result, funcResult];
}, Promise.resolve([]));
}

Keybase proof

I hereby claim:

  • I am tomruttle on github.
  • I am tomruttle (https://keybase.io/tomruttle) on keybase.
  • I have a public key ASApYYjpML7UiECpoKzOSCdXyD_IxnaivO3VsXUPebRN2go

To claim this, I am signing this object: