Recursive list comprehension

Joel Reymont <>
Fri Jan 13 11:41:50 CET 2006


On Jan 13, 2006, at 10:29 AM, Peter-Henry Mander wrote:

> I'm reading http://web.engr.oregonstate.edu/~erwig/papers/ 
> Zurg_JFP04.pdf
>
> I haven't read all of the paper but it probably gives good guidance in
> avoiding re-implementing backtracking in Erlang. Have you looked  
> there?

I believe that is the paper that I pointed to :-). Apart from a  
Haskell implementation that builds a lazy list I do not see any  
guidance in avoiding re-implementing backtracking in Erlang.

> Since Erlang was derived from Prolog a long time ago, I think Dr.  
> Joe &
> colleagues omitted backtracking because of rampant memory consumption
> and the possibly iffy use of red/green cut that I for one never  
> properly
> understood. Erlang gains clarity without backtracking methinks.

That much I understand but it does not answer the question of why my  
recursive comprehention returns [] instead of a long list of results.

Also, I _do_ want to implement backtracking in Erlang. I would like  
to use Erlang as a base for a future project that might require it  
and I do not want to switch to Haskell.

	Thanks, Joel

--
http://wagerlabs.com/








More information about the erlang-questions mailing list