We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3147df8 commit a05592fCopy full SHA for a05592f
lib/elixir/lib/io.ex
@@ -127,9 +127,21 @@ defmodule IO do
127
128
@doc """
129
Inspects and writes the given argument to the device
130
- followed by a new line. Returns the item given.
+ followed by a new line. A set of options can be given.
131
+
132
+ ## Examples
133
134
+ IO.inspect Process.list
135
136
+ """
137
+ def inspect(item, opts // []) do
138
+ inspect group_leader(), item, opts
139
+ end
140
141
+ @doc """
142
+ Inspects the item with options using the given device.
143
"""
- def inspect(device // group_leader(), item, opts // []) do
144
+ def inspect(device, item, opts) do
145
puts device, Binary.Inspect.inspect(item, opts)
146
item
147
end
0 commit comments