[erlang-questions] case not equal to

Roelof Wobben r.wobben@REDACTED
Sat Jan 31 09:43:39 CET 2015


Hello,

I have now this :

read(Key, [Head | List]) ->
   case element(1, Head) of
     Key -> {ok, element(2, Head)};
     _ -> read(Key, List).
   end


The second clause must be thay element(1,Head) is not equal to Key,

How do I take care of this.

This gives this error message ; db.erl:20: syntax error before: '.'

and !Key gives the same error message.

Roelof




More information about the erlang-questions mailing list