How to use conditional inside Enum iterator - error:cannot invoke remote function Kernel.elem/2 inside a match

Pattern-matching would be done with case rather than cond:

case x do
  {_, 1} -> "hello"
  _ -> ...
end

cond is more like a chain of if/else if