Skip to content

Instantly share code, notes, and snippets.

@jfreeze
Created January 25, 2014 20:43
Show Gist options
  • Save jfreeze/8623317 to your computer and use it in GitHub Desktop.
Save jfreeze/8623317 to your computer and use it in GitHub Desktop.
iex(3)> s2=File.stream!("APP_FL.uncompressed.pdf")
#Function<17.133702391 in Stream.resource/3>
iex(4)> Enum.map(s2, fn line -> IO.puts line end )
%PDF-1.5
** (ArgumentError) argument error
:io.put_chars(#PID<0.25.0>, :unicode, [<<37, 226, 227, 207, 211, 10>>, 10])
/Users/jimfreeze/.kiex/builds/elixir-git/lib/elixir/lib/enum.ex:885: Enum."-map/2-fun-0-"/3
/Users/jimfreeze/.kiex/builds/elixir-git/lib/elixir/lib/stream.ex:923: Stream.do_resource/5
/Users/jimfreeze/.kiex/builds/elixir-git/lib/elixir/lib/stream.ex:934: Stream.do_resource/5
/Users/jimfreeze/.kiex/builds/elixir-git/lib/elixir/lib/enum.ex:885: Enum.map/2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment