From 738a2955884ac2a3c4b92443950268df18e53711 Mon Sep 17 00:00:00 2001 From: Gabor Greif Date: Thu, 6 Oct 2022 22:45:19 +0200 Subject: [PATCH 1/2] s/funciton/function/g --- tutorials/motoko_playground.md | 2 +- tutorials/primitive_types.md | 4 ++-- tutorials/understanding_types.md | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tutorials/motoko_playground.md b/tutorials/motoko_playground.md index f7b9404..d74f9be 100644 --- a/tutorials/motoko_playground.md +++ b/tutorials/motoko_playground.md @@ -60,7 +60,7 @@ actor Counter { ``` -The actor has a stable variable counter, that will store the number of the counter and 3 public funcitons – get, set and inc. These functions form a public interface of our canister and we will see them in the generated Candid interface after deploy. +The actor has a stable variable counter, that will store the number of the counter and 3 public functions – get, set and inc. These functions form a public interface of our canister and we will see them in the generated Candid interface after deploy. > Candid is an IDL (interface definition language) developed for the IC ecosystem in order to facilitate communication between services written in different programing languages. You can read more about it [here](https://medium.com/dfinity/candid-a-tool-for-interoperable-programming-languages-on-the-internet-computer-27e7085cd97f). diff --git a/tutorials/primitive_types.md b/tutorials/primitive_types.md index 19b4bed..6a2612b 100644 --- a/tutorials/primitive_types.md +++ b/tutorials/primitive_types.md @@ -43,7 +43,7 @@ let b : Int = -10; let c : Int = 1_000_000; let d : Int = 0xf4; // 245 ``` -Let's make a little exercise now. Write a funciton called add, that will take two integers as arguments and return a sum of these two numbers. +Let's make a little exercise now. Write a function called add, that will take two integers as arguments and return a sum of these two numbers. ``` public query func add(a : Int, b : Int) : async Int { return a+b; @@ -135,7 +135,7 @@ let c : Text = "Hello, World!" // Ok let d : Text = 'Hello, World!' // Not ok ``` -Let's create a funciton concat, that will take two strings a and b as arguments and will return a concatenated text of them both with a single space between them. +Let's create a function concat, that will take two strings a and b as arguments and will return a concatenated text of them both with a single space between them. ``` public query func concat(a : Text, b : Text) : async Text { diff --git a/tutorials/understanding_types.md b/tutorials/understanding_types.md index d0a58fd..9c9423e 100644 --- a/tutorials/understanding_types.md +++ b/tutorials/understanding_types.md @@ -211,7 +211,7 @@ var days_mutable = Array.thaw(days); ``` Notice that some functions require to define the data type in the <> brackets. -Go through the base library and check what is inside for each type. These funcitons are going to save your time when writing your programs. However, please respect that Motoko is still quite a fresh language and there is not yet as many functions available as for more mature languages. +Go through the base library and check what is inside for each type. These functions are going to save your time when writing your programs. However, please respect that Motoko is still quite a fresh language and there is not yet as many functions available as for more mature languages. #### Anonymous functions @@ -268,7 +268,7 @@ let person2 : Person = { var partner = ?person1; // in real situation, we should also update the status of person1 and person2 and set partner for person1 if the relationship is symmetrical }; ``` -Optional values play significant roles also in function definitions as funciton can as well expect or return a null value. There will be more detailed tutorial on that soon. +Optional values play significant roles also in function definitions as function can as well expect or return a null value. There will be more detailed tutorial on that soon. ## Useful links and resources From a9301ecc1e46e8ad4a6142869fd5b04e740a619d Mon Sep 17 00:00:00 2001 From: Gabor Greif Date: Fri, 7 Oct 2022 11:45:05 +0200 Subject: [PATCH 2/2] typo --- tutorials/understanding_types.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tutorials/understanding_types.md b/tutorials/understanding_types.md index 9c9423e..d8c886c 100644 --- a/tutorials/understanding_types.md +++ b/tutorials/understanding_types.md @@ -215,7 +215,7 @@ Go through the base library and check what is inside for each type. These functi #### Anonymous functions -Anonymous functions are also known as lambdas. You define them for generic purpose in your program to complete small tasks. They are not ment to be part of the public interface. +Anonymous functions are also known as lambdas. You define them for generic purpose in your program to complete small tasks. They are not meant to be part of the public interface. ``` func add(x : Int, y : Int) : Int = x + y; ``` @@ -276,4 +276,4 @@ Motoko Bootcamp video about variables, functions and types by Albert Du https://www.youtube.com/watch?v=4YX41Nm7Wx8 Motoko Bootcamp video about variants by Paul Young -https://www.youtube.com/watch?v=GFenqSGhj7I& \ No newline at end of file +https://www.youtube.com/watch?v=GFenqSGhj7I&