Douglas Crockford

Blog
Books
Videos
2025 Appearances
Slides
JavaScript
Misty
JSLint
JSON
Pronto
Github
Electric Communities
Flickr Photo Album
Blue Sky
LinkedIn
Mastodon/Layer8
ResearchGate
Pronouns: pe/per
Aptera
The best is yet to come
About

Doing Nothing With Parseq

THIS PROJECT IS OBSOLETE. IT HAS BEEN SUPERSEDED BY PRONTO.

I made a change to Parseq. The parallel factory and the sequence factory will no longer throw errors when empty requestor arrays are passed in.

parseq.parallel([], [])(callback, initial_value) ≡ callback([])
parseq.sequence([])(callback, initial_value)     ≡ callback(initial_value)

If no requestors are passed, then parallel will pass an empty array to the callback, and sequence will pass the initial_value to the callback.

This tolerates workflows in which array.filter is used to produce the array of requestor functions. If the array is empty, parallel and sequence will nop in reasonable ways.

The race and fallback factories will still throw if they are not given requestors because they are only successful if a requestor is successful.

Parseq
Parseq on Github
How JavaScript Works, Chapter 20
Anonymization by Anonymouse.org ~ Adverts
Anonymouse better ad-free, faster and with encryption?
X