Re: [elixir-core:7750] Proposal: Allow IO.inspect to accept a function as argument

2018-01-12 Thread Greg Vaughn
I like the original idea and would like to suggest another approach. What if there were an additional Inspect.Opts of :transform? It then would enable this sort of thing: ["thing1", "thing2"] |> generate_more_things() |> IO.inspect(transform: /1) |> do_something_with_things() -Greg Vaughn >

Re: [elixir-core:7749] Proposal: Allow IO.inspect to accept a function as argument

2018-01-12 Thread José Valim
Thanks for the proposal! Unfortunately that would make us unable to inspect functions themselves, which is a valid argument to IO.inspect after all. Imagine the confusion of trying to inspect a pipeline that may emit an anonymous function only to find it is being executed instead. *José

[elixir-core:7749] Proposal: Allow IO.inspect to accept a function as argument

2018-01-12 Thread marcus
I often find myself wanting to inspect things in the middle of a chain of pipes, but I don’t always want to inspect the return values as-is. Sometimes I want to inspect sub-attributes or call functions on the return values to inspect them. For example, imagine the contrived pipeline below.

Re: [elixir-core:7747] Proposal: Improve ExUnit output for skipped tests

2018-01-12 Thread José Valim
Sounds great to me! *José Valimwww.plataformatec.com.br Founder and Director of R* On Fri, Jan 12, 2018 at 9:04 PM, Devon Estes wrote: > It's already happened to me a couple times this week where I'll have a > skipped test somewhere

[elixir-core:7747] Proposal: Improve ExUnit output for skipped tests

2018-01-12 Thread Devon Estes
It's already happened to me a couple times this week where I'll have a skipped test somewhere and forget to unskip it because when we have skipped tests in our suites it shows all green in the output. I'm sure I'm not the only one this happens to ;) I propose that when we have skipped tests in