(Wangle) Chaining reduce
authorHannes Roth <hannesr@fb.com>
Fri, 1 May 2015 01:39:13 +0000 (18:39 -0700)
committerPraveen Kumar Ramakrishnan <praveenr@fb.com>
Tue, 12 May 2015 00:02:00 +0000 (17:02 -0700)
commit9a797d917aaad916918e32d2dc7331b7208dda9e
tree58a2f32740220784bc86842463bc14c3be34eb60
parenta9c6c80d31f8a035bf4d7ef729956a8e110ef777
(Wangle) Chaining reduce

Summary:
Oh, this is best of both worlds: D2015316

If your reduce is really cheap, just use `collect/CollectAll->reduce`.
Otherwise just use `reduce`. Great?

This one doesn't support returning Futures from `func`, but if you want
to do that, just use `reduce`.

Test Plan: Run all the tests.

Reviewed By: hans@fb.com

Subscribers: folly-diffs@, jsedgwick, yfeldblum, chalfant

FB internal diff: D2017238

Tasks: 6025252

Signature: t1:2017238:1430422971:c3471afa53239681f835624becf3c4a238204b70
folly/futures/Future-inl.h
folly/futures/Future.h
folly/futures/test/FutureTest.cpp