
21 Nov
2008
21 Nov
'08
3:14 a.m.
positionB :: Double -> Behavior Double -> Behavior Double -> Behavior Double positionB x0 v t = (x0 +) <$> liftA2 (*) v t
On an unrelated note, I created a package called InfixApplicative, because I found that exactly this kind of expression looked ugly in my code. If you import it, you can define this instead: positionB x0 v t = (x0 +) <$> (v <^(*)^> t) Hope that helps Bob