]> Git — Sourcephile - tmp/julm/arpeggigon.git/blob - Reactogon/Auxiliary/Auxiliary.hs
First work on implementing single layer.
[tmp/julm/arpeggigon.git] / Reactogon / Auxiliary / Auxiliary.hs
1 {-# LANGUAGE Arrows #-}
2
3 module Reactogon.Auxiliary.Auxiliary where
4
5 import FRP.Yampa
6
7
8
9 -- Throws an Event when the incoming signal change. The Event is
10 -- tagged with the new value.
11 onChange :: (Eq a) => SF a (Event a)
12 onChange = proc a -> do
13 b <- onChange' -< a
14 returnA -< e
15 where onChange' :: (Eq a) => SF (a,a) Bool
16 onChange' = arr $ uncurry (==)