[erlang-questions] wierd outome on my match method
Loïc Hoguin
essen@REDACTED
Sat Jan 31 15:23:19 CET 2015
On 01/31/2015 03:11 PM, Roelof Wobben wrote:
> match( Key, [] ) ->
> {error, "Instance"};
>
> match(Key, List) ->
> delete_key (Key, List, []).
This above is the function you call. It does not perform a match.
> But when I have this database.
>
> Db5 : [{name2,tamara},{name,chantal},{name,roelof}]
>
> and I do this :
>
> Db11 = db:match(name,Db5).
>
> I see this outcome :
>
> [{name2,tamara}]
>
> and when I do this :
>
> Db10 = db:match(name2,Db5).
>
> I see this outcome:
>
> [{name,roelof},{name,chantal}]
>
> So it schould be the other way around.
>
> Can someone help me figure out what went wrong ?
>
> Roelof
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
--
Loïc Hoguin
http://ninenines.eu
More information about the erlang-questions
mailing list