-
Notifications
You must be signed in to change notification settings - Fork 39
flatMap implementation #61
Comments
for example that code could handle double click but it don't work with current implementation of flatMap val doubleClicks = for{
d1 <- downs
t1 = System.currentTimeMillis()
d2 <- downs.once
t2 = System.currentTimeMillis()
if t2-t1 <500
} yield d2 |
Hi, can you ask this on scala-user? This way we can get opinions from Thanks. On Friday, February 1, 2013, Yaroslav wrote:
|
Ok, thanks. I'll notify you if would see good answers. Hi, can you ask this on scala-user? This way we can get opinions from Thanks. On Friday, February 1, 2013, Yaroslav wrote:
— |
I'm currently liking the idea of renaming the current
And in this particular example |
Also, to handle the "double click" example, I propose 2 new functions
So if you have a clicks stream, a "double clicks" stream would look something like
P.S. The
And that would allow the "time" value to be more extensible and receptive to people who hate using |
Wow. Couple of day ago I was thinking about implementing sliding function for things like double click. =) |
Without ability to ask directly, just create an issue.
Why implementation of flatMap(f) just 'swich' between streams provided by f?
If trying to think about EventStreams as about collections, than flatMap(f) should return EventStream that will fire all events from all streams provided by f.
I understand that current functionality is necessary, but may be it should be called 'swich'.
As for me current implementation don't fit in the for comprehension.\
p.s. please close that issue, as it isn't actually an issue.
The text was updated successfully, but these errors were encountered: