Facing Problem while appending elements In a list

Are you maybe looking for something like Enum.chunk_every/2?

iex> Enum.chunk_every([1, 2, 3, 4, 5, 6], 2)
[[1, 2], [3, 4], [5, 6]]