Prying inside a pipeline

32 views
Skip to first unread message

rap...@eficienciafiscal.com.br

unread,
Jan 24, 2018, 10:02:06 AM1/24/18
to elixir-lang-core
Hi there,

A friend of mine asked me how to IEx.pry inside of a pipeline, I said there is no builtin functionality for this, so I sent him this code:

defmodule Debugger do
 
def pipry(value) do
   
require IEx

   
IEx.pry()

    value
 
end
end

It worked for him, but I wonder if such functionality should be builtin into the language, something like a `IEx.pry/1` or `IEx.pipe_pry/1` function.

What do you guys think? If this sounds like a good feature for the language, I would love to hear your input so I can give it a go and submit a PR.

OvermindDL1

unread,
Jan 24, 2018, 11:04:18 AM1/24/18
to elixir-lang-core
Well if `tee` gets added then this is yet another use case for it.  ^.^

Kelvin Raffael Stinghen

unread,
Jan 24, 2018, 11:38:09 AM1/24/18
to elixir-l...@googlegroups.com
Well, `tee` was not added to the core. So for now, one can use the `plumbing` package. https://hex.pm/packages/plumbing 

Best,
Kelvin Stinghen
kelvin....@me.com
Reply all
Reply to author
Forward
0 new messages