|
|
Sender notified by Mailtrack 11/21/18, 11:56:45 PM |
--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposal...@isocpp.org.
To post to this group, send email to std-pr...@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/067d8f3c-a700-4a4b-9ca7-6596480b20e9%40isocpp.org.
Unlike streams, those elements are countable and stored in-memory...
| From: Vu Pham Sent: Friday, November 30, 2018 8:15 AM Reply To: std-pr...@isocpp.org Subject: Re: [std-proposals] Asynchronously processing elements of stream in C++ |
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/20181130154025.5181497.36363.67131%40gmail.com.
Stream<tuple<T, U>> stream3 = zipWithLatest(stream1, stream2)Interval(ms) // emits a counter and increments every ms
stream >> throttle(n, ms) // emits up to n events per ms
stream1 >> map([](int ms){ return Interval(ms); });
counter() >> switchMap({stream1, stream2}, [](int i){ return i%2; });
// alternates between elements between stream 1 and stream 2
Questions:
counter()>> flatMap([](auto x){ return delayAndEmit(10ms, x); })>> flatMap([](auto x){ return delayAndEmit(100ms, x); })
In order to make scan work, we need to store it's state somewhere. Where do we store it?counter()>> scan(0, [](int a, int b){ return a+b; }) // emits the partial sum 0...n
|
|
Sender notified by Mailtrack 11/30/18, 5:14:43 PM |
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/20181130154025.5181497.36363.67131%40gmail.com.
|
|
Sender notified by Mailtrack 12/01/18, 6:20:38 PM |
--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposal...@isocpp.org.
To post to this group, send email to std-pr...@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/66b790f8-b7cc-2f31-c646-726a9ecc366d%40mail1.stofanet.dk.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAN0NuG6pe2AvWH5XTWvkiHpYF4a6VSBmvdm76QGw43z8f7PjQw%40mail.gmail.com.