write function to combine arrays
Merge pull request #31 from thorups/writer

write function to combine arrays