Nested for-loops, there has to be a better way to do this
Yves S. Garret
Fri Jul 31 04:07:05 CEST 2009
Yeh... late at night... messing around with Erlang code... initially
the idea was to make a bunch of nested loops, but it was for something
On Jul 29, 3:13 pm, Zoltan Lajos Kis <> wrote:
> Brentley Jones wrote:
> > 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.
> But if you look just one sentence further...
> "The idea was to be able to pass in a list [5, 5, 10] (for example) and
> go through it all like 3 dimensional array."
> Anyway, we should get the answer by dawn (CET) :)
> erlang-questions mailing list. Seehttp://www.erlang.org/faq.html
> erlang-questions (at) erlang.org
More information about the erlang-questions