Skip to content

Format and clean up crash-course #1638

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

Merged
merged 1 commit into from
Sep 21, 2022
Merged

Format and clean up crash-course #1638

merged 1 commit into from
Sep 21, 2022

Conversation

doughsay
Copy link
Contributor

A friend of mine recently found this page, and when he asked me questions about it I saw that it was pretty outdated. I've gone and updated the formatting of at least all the Elixir code to match the modern formatter and idioms, but I'm not familiar enough with Erlang to know if those examples need updating or not.

Hope this helps, please let me know if I should change anything.

Comment on lines +444 to +446
HelloModule.Utils.util()
# "Utilize"
#=> :ok
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't quite sure how to show here that there's stdout printing in addition to a return value.

Comment on lines 624 to +630
f = fn
{:a, :b} = tuple ->
IO.puts "All your #{inspect tuple} are belong to us"
[] ->
"Empty"
end
{:a, :b} = tuple ->
"All your #{inspect(tuple)} are belong to us"

[] ->
"Empty"
end
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing the IO.puts feels right to me here, but it causes it to differ from the Erlang example. I don't know how to change the Erlang example to make it match.

@josevalim josevalim merged commit 0317463 into elixir-lang:main Sep 21, 2022
@josevalim
Copy link
Member

💚 💙 💜 💛 ❤️

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