Re: [elixir-core:7889] Add a `label:` option to IO.inspect

2018-02-19 Thread Paul Schoenfelder
You can already do this today with IO.inspect(foo, label: "label") :) Paul On Mon, Feb 19, 2018 at 7:32 PM pragdave wrote: > When I use IO.inspect in a pipeline, I often find myself wanting to tag > the output with some kind of label: > > ~~~ elixir > get_name() > |> IO.inspect() > |> lookup_sc

[elixir-core:7889] Add a `label:` option to IO.inspect

2018-02-19 Thread pragdave
When I use IO.inspect in a pipeline, I often find myself wanting to tag the output with some kind of label: ~~~ elixir get_name() |> IO.inspect() |> lookup_score() |> IO.inspect ~~~ so I sometimes write a trivial helper ~~~ def dump(value, label) do IO.puts "#{label}: #{inspect value}" valu