[erlang-questions] Nested for-loops, there has to be a better way to do this

Brentley Jones <>
Wed Jul 29 21:05:42 CEST 2009


On Jul 29, 2009, at 1:57 PM, Zoltan Lajos Kis wrote:

> And what do I gain using this for function compared to simply  
> writing an "ad-hoc" recursive function whenever needed ?

Nothing is gained by my bloated, yet modular function. I was just  
expanding on the modular function listed before mine.

> PS: seriously, is this what the original question was getting at?

I do think it shows how to do nested for loops in a way that looks  
very imperative, which is what I think the original question was  
getting at.

On Jul 29, 2009, at 2:55 PM, Yves S. Garret wrote:

> I was playing around with the idea of implementing a nested for-loop
> like construct (I will concede, they are evil, but at rare times,
> necessary.)  In non-functional programming languages, they are trivial
> to do.  However, this has proved to be one of those simple things that
> are a pain in the neck for me.


More information about the erlang-questions mailing list