Changed argument orders for snapshot etc

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

also whenE (in reactive-0.10.3).
On Mon, Dec 8, 2008 at 3:46 PM, Conal Elliott
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

Tutorials http://netsuperbrain.com/blog/posts/category/reactive-tutorials/
updated.
2008/12/8 Conal Elliott
also whenE (in reactive-0.10.3).
On Mon, Dec 8, 2008 at 3:46 PM, Conal Elliott
wrote: 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
_______________________________________________ Reactive mailing list Reactive@haskell.org http://www.haskell.org/mailman/listinfo/reactive
-- David Sankel Sankel Software www.sankelsoftware.com 585 617 4748 (Office) 585 309 2016 (Mobile)
participants (2)
-
Conal Elliott
-
David Sankel