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

Addition to Newcomer Examples page #602

Open
garyrob opened this issue Feb 4, 2020 · 0 comments
Open

Addition to Newcomer Examples page #602

garyrob opened this issue Feb 4, 2020 · 0 comments

Comments

@garyrob
Copy link

garyrob commented Feb 4, 2020

The Newcomer Examples page invites newcomers to suggest an edit, but I can't suggest a specific edit because it involves something that I think would be a great example, but I don't yet know enough to explain it.

A lot of examples of Reason code have things like the following:

Console.log("Running Test Program:");
let () = print_endline(Lib.Util.hello());

That the complete source code to the main script in esy's hello-reason example project.

My understanding is that this idiom is used to ensure that the result is unit. But it's highly non-obvious to newcomers such as myself. And I especially don't know enough to understand why that would be useful in a module. It seems like describing this idiom in some detail (not just with respect to modules) would be a worthy addition to the Newcomer Examples page. But I can't do it yet; all I can do is post this issue.

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