[erlang-questions] create list quesion
Tue Jan 27 15:17:14 CET 2015
You can make a local function that takes more arguments and call it.
On 01/27/2015 03:15 PM, Roelof Wobben wrote:
> I try now to solve a challenge where I must make a list from a range,
> So for example if I do create(2) the outcome have to be [ 1, 2]
> So i can do
> create(0) ->
> print array
> but as far as I know the list is then not in the scope so I cannot use
> it when I do
> create(2) ->
> add the 2 to the array.
> How do I take care that the list is in the scope and still using only
> Can anyone give me a tip about it ?
> erlang-questions mailing list
More information about the erlang-questions