Skip to content

answer #30

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
// ReasonMl
"reason.diagnostics.tools": ["merlin", "bsb"],
"editor.formatOnSave": true,
"reason.codelens.enabled": true
}
14 changes: 14 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

74 changes: 37 additions & 37 deletions src/exercises/01-introduction/introduction.re
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
/*
Hello,

Reason is not a new language. It is syntactic sugar for the OCaml language
created in 1996. The new Reason syntax will look familiar to those who have
programmed in Javascript.

These challenges are originally from the workshop run by Jane Street to
teach OCaml. It was ported over to Reason with the help of `refmt` (Reason
format) binary that helps you convert to/from Reason/OCaml syntax.

This exercise is to familiarize you with the code-compile cycle.

To compile your code, run in a terminal session in the root directory

$ npm run build

You should see a compilation error because it's missing the end quote. Add
the end quote and re-run. You should see that the code compiled successfully!

For convenience you can build whenever you change the code by running the
compiler in watch mode. For that, run

$ npm run start

You can also execute code in Reason's REPL (rtop) directly. To start rtop from
your terminal run:

$ rtop

Now try pasting the code below into it.

*Note:* Use `Ctrl-d` to exit the rtop session.

Try these out and move on to the next exercise!
*/
let () = print_endline("Hello, World!);
/*
Hello,
Reason is not a new language. It is syntactic sugar for the OCaml language
created in 1996. The new Reason syntax will look familiar to those who have
programmed in Javascript.
These challenges are originally from the workshop run by Jane Street to
teach OCaml. It was ported over to Reason with the help of `refmt` (Reason
format) binary that helps you convert to/from Reason/OCaml syntax.
This exercise is to familiarize you with the code-compile cycle.
To compile your code, run in a terminal session in the root directory
$ npm run build
You should see a compilation error because it's missing the end quote. Add
the end quote and re-run. You should see that the code compiled successfully!
For convenience you can build whenever you change the code by running the
compiler in watch mode. For that, run
$ npm run start
You can also execute code in Reason's REPL (rtop) directly. To start rtop from
your terminal run:
$ rtop
Now try pasting the code below into it.
*Note:* Use `Ctrl-d` to exit the rtop session.
Try these out and move on to the next exercise!
*/
let () = print_endline("Hello, World!");
Loading