[reactive] Changed argument orders for snapshot etc
Conal Elliott
conal at conal.net
Mon Dec 8 18:46:28 EST 2008
I swapped the argument order for snapshot and a few other functions. For
instance,
-- old type
snapshot :: Event a -> Behavior b -> Event (a,b)
-- new type
snapshot :: Behavior b -> Event a -> Event (a,b)
So that 'snapshot b' is an event transformer. This change makes other
operations work out nicely when partially applied.
Take careful note of the argument and result orders. I'm not sure what's
most memorable. I've kept to the convention that the additional info is in
the second half of the result. Also a bit odd:
snapshotWith :: (a -> b -> c) -> Behavior b -> Event a -> Event c
The complete list of argument-swappedfns: snap, snapshot, snapshot_,
snapRemainderE, splitE (watch out).
Libraries affected: reactive, reactive-glut, reactive-fieldtrip.
- Conal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/reactive/attachments/20081208/a17358eb/attachment.htm
More information about the Reactive
mailing list