[erlang-questions] Lists in recursion

Bengt Kleberg bengt.kleberg@REDACTED
Fri Mar 27 14:27:31 CET 2015


Greetings,

Is the goal of this exercise to create a bigger list from the call?
Then you need lists:foldl/3 or foldr/3


bengt

On 03/27/2015 01:42 PM, harsha sri wrote:
> Hi,
>
> Is it possible to add dynamically add elements to List in recursion?
>
> ex: List = [1,2,3]
>
> lists:foreach...
>
> .....
> List = [4 | List]
> ....
> (anotherlist).
>
> Finally i am expecting in List: [1,2,3,4]
>
> Thanks & Regards,
> Harsha.
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150327/6fede148/attachment.htm>


More information about the erlang-questions mailing list