On Tue, 4 Jan 2011, Hudak, Paul wrote:
I think you cannot translate a functional expression like
mix x (delay x)
literally to a line of arrow syntax, that is, without introducing a
variable name for the output of (delay x), unless I am missing something.
You're right, but it seems relatively painless:
y <- delay t -< x
returnA -< x+y
I guess it's just a matter of style.
Of course, in this simple case the problem can be resolved quite easy by
introducing a new identifier. My point for the general case is: In an
expression, where signal processes are functions and signals are function
arguments (like (mix x (delay x))), I need names for signals only when
they are shared, i.e. used as input to more than one other signal process.
In the arrow notation I need more temporary identifiers, namely whenever a
signal process has more than one input that are outputs of more than one
arrow. This happens quite often in my experience.
_______________________________________________
haskell-art mailing list
[email protected]
http://lists.lurk.org/mailman/listinfo/haskell-art