I am learning Elixir from offical docs.
I am bit confused about my comprehension of Elixir s pattern matching. Please have a look at below example.
[_] = [1,2,3]
专 员
(MatchError) no match of right hand side value: [1, 2, 3]
(stdlib 5.0.2) erl_eval.erl:498: :erl_eval.expr/6
iex:32: (file)
但是,为什么在法典以下产生这样的错误。 我感到,就像我所缺的。
%{name: person_name} = %{name: "Fred", favorite_color: "Taupe"}
专 员
%{name: "Fred", favorite_color: "Taupe"}
我没有做任何事情。 我请聊天。