Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
15 lines (12 sloc) 262 Bytes
"https://poeticoding-data.sfo2.digitaloceanspaces.com/httpstream/numbers.txt"
|> HTTPStream.get()
|> HTTPStream.lines()
|> Stream.map(fn line->
case Integer.parse(line) do
{num, _} -> num
:error -> 0
end
end)
|> Enum.take(30)
|> Enum.sum()
|> IO.puts()
You can’t perform that action at this time.