Thanks, Ryan. I think I unppderstand the idea behind your function,
which is a lot cleaner then my first queue implementation.
I'm not sure if I could have quite programmed it from scratch
yet, but that will come in time!
I had to fix up a little bit of glue code to get your suggestions
to compil
One way to think about Reactive's notion of "Future" is as a single
element of an event stream--something that might happen (yielding a
value) some time in the future.
'mempty' on futures is a future that never happens, and 'mappend' says
to pick the first of two futures to happen.
m >>= k waits f
On , Ryan Ingram wrote:
Hi Sam. I don't know much about the performance problems you are
seeing, but I think your solution is more cleanly implemented just
under the event level with futures.
I think the reactive function you want has a type like this:
stateMachine :: s -> (a -> s -> s) ->
Hi Sam. I don't know much about the performance problems you are
seeing, but I think your solution is more cleanly implemented just
under the event level with futures.
I think the reactive function you want has a type like this:
stateMachine :: s -> (a -> s -> s) -> (s -> Future (b, s)) -> Event
Hi all,
I hope someone is interested in helping me out with the reactive library.
I am trying to implement a function "queue" in reactive:
queue :: Double -> Event a -> Event a
This is a simple queue: events from the event stream coming into the queue,
queue up waiting to be processed one by on