Channel: Fix bug in map()

Do not append a new element each time the channel produces a value.