From 3d925ae43e88f000ada43e6508fb1d381d7d2a40 Mon Sep 17 00:00:00 2001 From: Lesenechal Remi Date: Wed, 25 Dec 2019 22:53:40 +0100 Subject: [PATCH] fix "types.md" --- gitlab-pages/docs/language-basics/types.md | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/gitlab-pages/docs/language-basics/types.md b/gitlab-pages/docs/language-basics/types.md index 846424d36..a2d456473 100644 --- a/gitlab-pages/docs/language-basics/types.md +++ b/gitlab-pages/docs/language-basics/types.md @@ -59,12 +59,12 @@ let ledger: account_balances = Map.literal ```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 = Map.literal([ - ("tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx": address, 10mutez), + ("tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx": address, 10mutez) ]); ``` @@ -124,25 +124,23 @@ let ledger: account_balances = Map.literal ```reasonligo -/* alias two types */ +(* alias two types *) type account = address; type number_of_transactions = nat; -/* account_data consists of a record with two fields (balance, number_of_transactions) */ +(* account_data consists of a record with two fields (balance, number_of_transactions) *) type account_data = { balance: tez, number_of_transactions, }; -/* our ledger / account_balances is a map of account <-> 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([ - ( - "tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx": address, - {balance: 10mutez, number_of_transactions: 5n}, - ), + ("tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx": address, + {balance: 10mutez, number_of_transactions: 5n}) ]); ```