@@ -11,7 +11,7 @@ There is a comprehensive [Cheat-sheet](#cheat-sheet) at the end.
1111
1212## The Basics
1313
14- Define named functions with a [ let binding] ( let-binding.md ) , parenthesis ` () ` ,
14+ Define named functions with a [ let binding] ( let-binding.md ) , parentheses ` () ` ,
1515and an arrow ` => ` :
1616
1717``` reason
@@ -42,12 +42,12 @@ have "no arguments". This is commonly used when a function has side-effects.
4242The unit argument looks like ` () ` :
4343
4444``` reason
45- let launchMissle = () => {
45+ let launchMissile = () => {
4646 someSideEffects();
47- print_endline("Missles have been launched!");
47+ print_endline("Missiles have been launched!");
4848};
4949
50- launchMissle ();
50+ launchMissile ();
5151```
5252
5353## Named Arguments
@@ -216,7 +216,7 @@ fn(~data=x, ());
216216```
217217
218218Reason provides a shorthand syntax for the pattern above. Prefixing a named
219- argument's value with a question mark at the call site, will pass whatever is
219+ argument's value with a question mark at the call site will pass whatever is
220220inside of the ` Some() ` , but if the value is ` None ` , then the named argument
221221will not be supplied at all.
222222
@@ -236,7 +236,7 @@ values too._
236236
237237#### Referencing Previous Arguments
238238
239- When defining default values previous arguments may be used:
239+ When defining default values, previous arguments may be used:
240240
241241``` reason
242242let add = (a, ~b, ~c=a+1, ~d=b+1, ()) => a + b + c + d;
@@ -247,7 +247,7 @@ add(1, ~b=1, ~c=10, ()); /* 14 */
247247
248248## No Var-args
249249
250- This is no way to define a function that accepts a variable number of arguments
250+ There is no way to define a function that accepts a variable number of arguments
251251in Reason. A workaround can be to accept a list as the final argument.
252252
253253## Cheat-sheet
0 commit comments