Hi guys,
The following code snippet gives a headache.
"/home/thiel/testdata.txt"
|> Path.expand(__DIR__)
|> File.stream!
|> Stream.map( &(String.trim(&1, " ")))
|> CSV.decode
|> Enum.each( fn({_, y}) -> IO.inspect(y) end)
This code writes the next lists (y) to console:
[“10.5”, “11.5”, “12.5”]
[“20.5”, “21.5”, “22.5”]
How do I have to adapt this code to write the lists to a file?
Many thanks.
Thiel Chang