[erlang-questions] how to add a tuple to a list.

e@REDACTED e@REDACTED
Thu Jan 29 20:06:37 CET 2015


> So i have to make a tuple of the data and add it in a list.
>
> I thought I could do something like this :
>
> write(Key, Data, Db) ->
>    [ {key, data} | Db ]
>
> but then I see some error messages.

what messages?

as far as i can _theorize_
the most probably your Db is not a list, and it should be.



More information about the erlang-questions mailing list