optimization ?
Bengt Kleberg
eleberg@REDACTED
Tue Apr 22 10:34:29 CEST 2003
> Date: Tue, 22 Apr 2003 01:09:11 -0500
> From: Chris Pressey <cpressey@REDACTED>
> Subject: Re: optimization ?
...deleted
> expensive compared to a simple cons. You might want to try [T|Acc]...
>
> > end;
> > Other ->
> > dirs(Top, Tail, Acc)
> > end;
> >
> > dirs(_Top, [], Ack) -> Ack.
>
> ...then lists:flatten/1 the result here before you return it, if you
are you sure?
i tried this (but might have made a mistake) and the result i got was 1
single (long) string.
the original result, a list of strings, is much more readable.
bengt
More information about the erlang-questions
mailing list