diff --git a/gitlab-pages/docs/language-basics/boolean-if-else.md b/gitlab-pages/docs/language-basics/boolean-if-else.md index 379c8ea04..ba928a110 100644 --- a/gitlab-pages/docs/language-basics/boolean-if-else.md +++ b/gitlab-pages/docs/language-basics/boolean-if-else.md @@ -54,7 +54,7 @@ let c: bool = (a = b) ```reasonligo let a: string = "Alice"; let b: string = "Alice"; -// true +/* true */ let c: bool = (a == b); ``` @@ -122,7 +122,7 @@ let c: bool = (a = b) ```reasonligo let a: tez = 5mutez; let b: tez = 10mutez; -// false +/* false */ let c: bool = (a == b); ``` diff --git a/gitlab-pages/docs/language-basics/functions.md b/gitlab-pages/docs/language-basics/functions.md index 5488d507f..defeb9af7 100644 --- a/gitlab-pages/docs/language-basics/functions.md +++ b/gitlab-pages/docs/language-basics/functions.md @@ -80,7 +80,7 @@ along with a return type. Here's how you define a basic function that accepts two `ints` and returns an `int` as well: ```reasonligo -let add (a: int, b: int) : int = a + b; +let add = (a: int, b: int) : int => a + b; ``` The function body is a series of expressions, which are evaluated to give the return diff --git a/gitlab-pages/docs/language-basics/math-numbers-tez.md b/gitlab-pages/docs/language-basics/math-numbers-tez.md index 02be976ed..d108168e5 100644 --- a/gitlab-pages/docs/language-basics/math-numbers-tez.md +++ b/gitlab-pages/docs/language-basics/math-numbers-tez.md @@ -63,18 +63,18 @@ let g: int = 1_000_000 ```reasonligo -// int + int produces int +/* int + int produces int */ let a: int = 5 + 10; -// nat + int produces int +/* nat + int produces int */ let b: int = 5n + 10; -// tez + tez produces tez +/* tez + tez produces tez */ let c: tez = 5mutez + 10mutez; -// you can't add tez + int or tez + nat, this won't compile -// let d: tez = 5mutez + 10n; -// two nats produce a nat +/* you can't add tez + int or tez + nat, this won't compile */ +/* let d: tez = 5mutez + 10n; */ +/* two nats produce a nat */ let e: nat = 5n + 10n; -// nat + int produces an int, this won't compile -// let f: nat = 5n + 10; +/* nat + int produces an int, this won't compile */ +/* let f: nat = 5n + 10; */ let g: int = 1_000_000; ``` @@ -116,10 +116,10 @@ let d: tez = 5mutez - 1mt ```reasonligo let a: int = 5 - 10; -// substraction of two nats, yields an int +/* substraction of two nats, yields an int */ let b: int = 5n - 2n; -// won't compile, result is an int, not a nat -// let c: nat = 5n - 2n; +/* won't compile, result is an int, not a nat */ +/* let c: nat = 5n - 2n; */ let d: tez = 5mutez - 1mt; ``` @@ -152,7 +152,7 @@ let c: tez = 5n * 5mutez ```reasonligo let a: int = 5 * 5; let b: nat = 5n * 5n; -// you can also multiply `nat` and `tez` +/* you can also multiply `nat` and `tez` */ let c: tez = 5n * 5mutez; ``` diff --git a/gitlab-pages/docs/language-basics/sets-lists-touples.md b/gitlab-pages/docs/language-basics/sets-lists-touples.md index 9549f69ac..bf997edea 100644 --- a/gitlab-pages/docs/language-basics/sets-lists-touples.md +++ b/gitlab-pages/docs/language-basics/sets-lists-touples.md @@ -258,7 +258,7 @@ let sum_of_a_list: int = List.fold sum my_list 0 ```reasonligo let sum = (result: int, i: int): int => result + i; -// Outputs 6 +/* Outputs 6 */ let sum_of_a_list: int = List.fold(sum, my_list, 0); ``` diff --git a/gitlab-pages/docs/language-basics/strings.md b/gitlab-pages/docs/language-basics/strings.md index 76435b62c..efd629c6a 100644 --- a/gitlab-pages/docs/language-basics/strings.md +++ b/gitlab-pages/docs/language-basics/strings.md @@ -17,7 +17,7 @@ const a: string = "Hello Alice"; let a: string = "Hello Alice" ``` -``` +```reasonligo let a: string = "Hello Alice"; ``` diff --git a/gitlab-pages/docs/language-basics/types.md b/gitlab-pages/docs/language-basics/types.md index 03762940c..3f4fa4d58 100644 --- a/gitlab-pages/docs/language-basics/types.md +++ b/gitlab-pages/docs/language-basics/types.md @@ -57,9 +57,9 @@ let ledger: account_balances = Map.literal [(("tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx": address), 10mutez)] ``` - + ```reasonligo -// account_balances is a simple type, a map of address <-> tez +/* account_balances is a simple type, a map of address <-> tez */ type account_balances = map(address, tez); let ledger: account_balances = @@ -122,7 +122,7 @@ let ledger: account_balances = Map.literal )] ``` - + ```reasonligo /* alias two types */ type account = address; @@ -135,8 +135,8 @@ type account_data = { /* our ledger / account_balances is a map of account <-> account_data */ type account_balances = map(account, account_data); -// pseudo-JSON representation of our map -// {"tz1...": {balance: 10mutez, number_of_transactions: 5n}} +/* pseudo-JSON representation of our map */ +/* {"tz1...": {balance: 10mutez, number_of_transactions: 5n}} */ let ledger: account_balances = Map.literal([ ( diff --git a/gitlab-pages/docs/language-basics/variables-and-constants.md b/gitlab-pages/docs/language-basics/variables-and-constants.md index f2d388abd..caeafad93 100644 --- a/gitlab-pages/docs/language-basics/variables-and-constants.md +++ b/gitlab-pages/docs/language-basics/variables-and-constants.md @@ -5,8 +5,6 @@ title: Constants & Variables The next building block after types are constants and variables. -pleh. - ## Constants Constants are immutable by design, which means their values can't be reassigned.