CTM: Exercise 3-9

Posted by Urban Hafner Thu, 15 Sep 2005 18:55:46 GMT

The problem

Iterative computations and dataflow variables. The previous exercise shows that using dataflow variables sometimes makes it simpler to write iterative list operations. This leads to the following question. For any iterative operation defined with dataflow variables, is it possible to give another iterative definition of the same operation that does not use dataflow variables?

My solution

I’m really unsure about this one. If anyone can explain it in a nice and convincing way I’d happily replace my hand waving with it.

If we assume that iterative computation means the function Iterate from section 3.2.4 then it seems possible to replace any use of dataflow variables. Just translate your function into one similar to Iterate and you have removed any dataflow variables.

Tags , , , , , ,

Comments are disabled