Skip to content
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 function pattern matching to solve naming issues #150

Open
nappex opened this issue Oct 29, 2022 · 0 comments
Open

Use function pattern matching to solve naming issues #150

nappex opened this issue Oct 29, 2022 · 0 comments

Comments

@nappex
Copy link
Collaborator

nappex commented Oct 29, 2022

If we use function pattern matching feature available in elixir then we can use same name for some functions in Downloader module.

Consider to rename main as download and download_urls_from_file also as download then these will diff just by defined arguments. Download without any args will behave as our main and download with defined arg as only one a needs to be file will behave as our download_urls_from_file. This approach will solve our naming issue.

function pattern matching - https://inquisitivedeveloper.com/lwm-elixir-23/

@Glutexo Glutexo changed the title Use fucntion pattern matching to solve naming issues Use function pattern matching to solve naming issues Feb 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant