-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
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
Use default argument for load_urls #65
Conversation
Keep the logic of load_urls input in this function. Leverage default argument values to achieve this. As a result, the download/2 function is simplified.
def load_urls(path \\ nil) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm I am confused what does it mean. Do you have some material or docs where did you find this approach, please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It’s a default argument. See https://hexdocs.pm/elixir/Kernel.html#def/2-default-arguments. Again, it is a syntactic sugar for multiple functions of the same name.
Closing without merging. I don’t want to do this any more. Feel free to comment or reopen. |
Keep the logic of load_urls input in this function. Leverage default argument values to achieve this. As a result, the
download/2
function is simplified.