Wed May 25 15:50:27 CEST 2005
I just hit a problem where I clearly see how simple it would be with lazy evaluation. But since we don't have that, I wonder if anyone could point me to some non-lazy algorithms.
I have a graph described by a list of nodes. The nodes refer to other nodes by name. I need to traverse the graph and do stuff on each node, without traversing a node more than once. Of course, the 'stuff' done above is recursive (the value for a node depends on the values of its linked nodes), so visiting a node results in visiting all linked ones.
All references I found about doing this in a functional language are Haskell ones, and they use lazyness. Does anyone know about where to look for hints on how to solve this in a strict language?
I have partial solutions, but I seem to be missing something, and such a problem can't be something new in computer science.
Thanks in advance! best regards,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions