We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A workspace command that inlines a private function
Example:
defmodule Example do def run(list) do Enum.map(list, &square/1) end defp square(x) do x * x end end
Hovering square in the run function should and using the workspace command should result in:
run
defmodule Example do def run(list) do square = fn x -> x * x end Enum.map(list, square) end end
Consider the following scenarios:
square(3)
square.(3)
The text was updated successfully, but these errors were encountered:
@NJichev i think that my expectation for this sort of refactor would be to actually inline the function with a lambda at the call sites.
so you example of
would refactor to
defmodule Example do def run(list) do Enum.map(list, fn x -> x * x end) end end
Sorry, something went wrong.
No branches or pull requests
A workspace command that inlines a private function
Example:
Hovering square in the
run
function should and using the workspace command should result in:Consider the following scenarios:
square(3)
should be converted to their anonymous counterpart:square.(3)
The text was updated successfully, but these errors were encountered: