y_t = \sum\nolimits_{i = 0}^{n - 1} {x_{t - i} \cdot h_i }
\] \\
\begin{code}
- fir (State pxs) x = (pxs**hs, State (pxs<++x))
+ fir (State {-"{\color<2>[rgb]{1,0,0}"-}pxs{-"}"-}) {-"{\color<3>[rgb]{1,0,0}"-}x{-"}"-} = ({-"{\color<5>[rgb]{1,0,0}"-}pxs**hs{-"}"-}, State ({-"{\color<4>[rgb]{1,0,0}"-}pxs<++x{-"}"-}))
where hs = $(vectorTH [2::Int16,3,-2,4])
\end{code}
\centerline{\begin{tabular}{rl}
- |pxs| & Previous x's (state)\\
- |x| & New input value\\
- |pxs <++ x| & Remember new |x|, remove oldest\\
- |pxs ** hs| & Output
+ {\color<2>[rgb]{1,0,0}|pxs|} & Previous x's (state)\\
+ {\color<3>[rgb]{1,0,0}|x|} & New input value\\
+ {\color<4>[rgb]{1,0,0}|pxs <++ x|} & Remember new |x|, remove oldest\\
+ {\color<5>[rgb]{1,0,0}|pxs ** hs|} & Output
\end{tabular}}
\end{frame}
\note[itemize]{