Hi folks from the cafe!!

Last weekend, I was wondering on how hard it would be to use Haskell for mixed-signal processing.

Here is an example of an digital integrator:

summation=zipWith (+)

delay xs=(fromIntegral 0):xs

integrator xs=let ws=summation (integrator xs) xs in delay ws

The input and output are infinite streams. I have a few questions:

1) Is it possible to change it to use arrows? How would it look like?

2) How would one implement an continuous time version?

For 2) I would like to implement something like that digital integrator, so I could create filters based on integrator loops like this one:

x(t) ----(+)----> Integrator --|---> y(t)

^ |
|--------------------| Note that x(t) would be a function, and I would expect to create a function y, based on this flow!

Rafael Gustavo da Cunha Pereira Pinto

--

Rafael Gustavo da Cunha Pereira Pinto

_______________________________________________

Haskell-Cafe mailing list

[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe