> First, the suspicion that lazy evaluation may lead to a non-termination
> of such algorithm is almost surely wrong, and in any case it is against
> my religious beliefs [some twisted smiley here].
>
Sorry to have clubbed both lazy evaluation and non-termination. I
meant that Lazy eval could have
Vimal writes:
...
Now, I face some problem which i think is due to Lazy evaluation.
I tried adding strictness in as many meaningful places as possible,
but it doesnt work :(
I have sat with the code for a long time, and yet I am not able to
come up with a convincing reason as to why it doesn
> So add another argument containing all nodes seen in any path, and
> maintain that properly. You're going to need to make your DFS >
> routine
> tail-recursive.
> The problem is efficiency. I don't know if it can be done in
> linear time
> without state (and something like arrays with O(1) acces