New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added async function chain #37

Merged
merged 2 commits into from Dec 13, 2017

Conversation

Projects
None yet
2 participants
@RobertAKARobin
Copy link
Contributor

RobertAKARobin commented Dec 12, 2017

I included a "long form" as well. I think providing an explanation in this way may be very helpful to beginners, for whom this is a great resource. GitHub's <details> functionality is a little-known secret.

```js
const chainAsync = fns => {
let curr = 0; const next = () => fns[curr++](next); next()
}

This comment has been minimized.

@Chalarangelo

Chalarangelo Dec 12, 2017

Member

Provide an example in a comment, below the declaration, please.

This comment has been minimized.

@RobertAKARobin
}
```

<details>

This comment has been minimized.

@Chalarangelo

Chalarangelo Dec 12, 2017

Member

Indeed <details> is a pretty cool way to explain, but it doesn't play on any MS browser, so this is probably a bit of a problem. Maybe linking to an explanation or article would be preferrable.

This comment has been minimized.

@RobertAKARobin

RobertAKARobin Dec 12, 2017

Contributor

I wasn't aware of the MS limitation. Shouldn't be surprised. Thanks.

Robin Thomas and others added some commits Dec 12, 2017

Update chain-async-functions.md
Improved example and formatting
@Chalarangelo
Copy link
Member

Chalarangelo left a comment

Thanks for contributing! Merging right away!

@Chalarangelo Chalarangelo merged commit 4e825f1 into 30-seconds:master Dec 13, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment