         false -> {k, [Map.get(map2, k)]}
       end
     end)
-    |> Stream.filter(fn({_,v}) -> v !== nil end)
+    |> Enum.filter(fn({_,v}) -> v !== nil end)
     |> Enum.into(%{})
   end
 

            true ->
              v_diff2 = Map.delete(v_diff, "_t")
              v_map
              |> Stream.with_index
              |> Stream.map(fn({v, k}) -> {to_string(k),v} end)
              |> Enum.into(%{})
              |> do_patch_list(%{}, v_diff2, 0)
            false -> do_patch(v_map, v_diff)

    end
  end

  defp do_diff(l1, l2) when is_list(l1) and is_list(l2) do
    map1 = Enum.with_index(l1) |> Enum.into(%{})
    map2 = Enum.with_index(l2) |> Enum.into(%{})
    {rest_map2, new_list} = Enum.reduce(map1, {map2, %{}},
      fn({k, i1}, {new_map2, acc}) ->
        case Map.get(new_map2, k) do
          nil -> {new_map2, Map.put(acc, "_"<>to_string(i1), [k, 0, 0])}
          ^i1 -> {Map.delete(new_map2, k), acc}
          i2 -> {Map.delete(new_map2, k),
                 Map.put(acc, "_"<>to_string(i1), ["", i2, 3])}
        end
      end
    )
    Enum.reduce(rest_map2, new_list,
      fn({k2, i3}, acc) ->
        Map.put(acc, to_string(i3), [k2])
      end
    )
    |> Enum.to_list
    |> check_shift(0)
    |> check_map
    |> Enum.concat([{"_t", "a"}])
