Having problem with list pattern machine in Map

See

for {_key, value} <- convert_errors do
  IO.inspect value
end

For each tuple {_key, value} which is an element of the collection/enumeration named convert_errors

{_key, [value]}  =  convert_errors

Match the (single) value named convert_errors with the tuple pattern {_key,[value]} pattern, whereupon a successful match the value is destructured according to the pattern and the subvalues are bound to the names _key and value (the leading underscore in _key indicating that the contents bound to the name _key will not be used any further).

3 Likes