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