Skip to content

Conversation

mgartner
Copy link
Contributor

This is an attempt to build functionality of IO.inspect/3 that was mentioned in the proposal here: https://groups.google.com/forum/#!topic/elixir-lang-core/TUkmNHI4IbI

The goal is to make something like this...

["thing1", "thing2"]
|> generate_more_things()
|> (fn things ->
  things |> length() |> IO.inspect()
  things
end).()
|> do_something_with_things()

simpler to write, with something like this...

["thing1", "thing2"]
|> generate_more_things()
|> IO.inspect(apply: &length/1)
|> do_something_with_things()

@josevalim
Copy link
Member

Thanks @mgartner! There is no agreement yet if the feature will be added and, if so, in which shape, so I will go ahead and close this until there is a conclusion. If we agree this is the way to go, then we will reopen it, review it and merge it!

@josevalim josevalim closed this Jan 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants