Skip to content

Commit 171859e

Browse files
wmorgueAlexanderPrendota
authored andcommitted
refactor(examples): fix typos (Kotlin#39)
1 parent c8f2496 commit 171859e

File tree

11 files changed

+15
-15
lines changed

11 files changed

+15
-15
lines changed

_examples/nullSafety.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Null Safety
33
---
44

55

6-
In an effort to rid the world of `NullPointerException`, variable types in Kotlin don't allow the assigment of `null`.
6+
In an effort to rid the world of `NullPointerException`, variable types in Kotlin don't allow the assignment of `null`.
77

88
<div class="sample" markdown="1">
99

@@ -27,7 +27,7 @@ fun main(args: Array<String>) {
2727
1. Declare a non-null String variable
2828
2. Declare a nullable String variable
2929
3. Set the nullable variable to null
30-
4. When infering types, the compiler assumes non-null for variables that are initialized with a value
30+
4. When inferring types, the compiler assumes non-null for variables that are initialized with a value
3131

3232
### Working with nulls
3333

_examples/ranges.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,6 @@ fun main(args: Array<String>) {
5656
4. Increment step for char ranges are also valid
5757
5. To create a range in _reverse_ order use `downTo()` function
5858
6. Ranges are also useful in `if` statements
59-
7. `!in` is oposite of `in`. Statement is equal to `_false_`
59+
7. `!in` is opposite of `in`. Statement is equal to `_false_`
6060

6161

examples/01_introduction/04_Null Safety.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Null Safety
22

3-
In an effort to rid the world of `NullPointerException`, variable types in Kotlin don't allow the assigment of `null`.
3+
In an effort to rid the world of `NullPointerException`, variable types in Kotlin don't allow the assignment of `null`.
44

55
<div class="language-kotlin" theme="idea" data-min-compiler-version="1.3">
66

@@ -28,7 +28,7 @@ fun main() {
2828
2. Trying to assign `null` to non-nullable variable produces a compilation error.
2929
3. Declare a nullable String variable.
3030
4. Set the nullable variable to `null`.
31-
5. When infering types, the compiler assumes non-`null` for variables that are initialized with a value.
31+
5. When inferring types, the compiler assumes non-`null` for variables that are initialized with a value.
3232

3333
## Working with nulls
3434

examples/02_control_flow/03_Ranges.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,5 @@ fun main() {
5252
4. Increment step for char ranges are also valid
5353
5. To create a range in _reverse_ order use `downTo()` function
5454
6. Ranges are also useful in `if` statements
55-
7. `!in` is oposite of `in`. Statement is equal to `_false_`
55+
7. `!in` is opposite of `in`. Statement is equal to `_false_`
5656

examples/03_special_classes/01_Data classes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ fun main() {
3939
2. Auto-generated `equals` makes data classes with equal information equals as well.
4040
3. Equal data classes have equal `hashCode()`.
4141
4. Predefined `copy` function makes it easy to obtain a new instance.
42-
5. Property values can be changed on copy. The order corresponds to contructor argument order.
42+
5. Property values can be changed on copy. The order corresponds to constructor argument order.
4343
6. It is possible to change only some values.
4444
7. Use named arguments to change the second value without altering the first one.
4545
8. Additionally special `componentN` functions are generated.

examples/05_stdlib/03_filter.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# filter
22

3-
*filter* is a function defined in the standard library that can be used to filter collection. It takes a predicate as an lambda-paramters.
3+
*filter* is a function defined in the standard library that can be used to filter collection. It takes a predicate as an lambda-parameters.
44

55
<div class="language-kotlin" theme="idea" data-min-compiler-version="1.3">
66

@@ -16,8 +16,8 @@ fun main() {
1616
//sampleEnd
1717

1818
println("Numbers: $numbers")
19-
println("Positive Numbers: positives")
20-
println("Negative Numbers: negatives")
19+
println("Positive Numbers: $positives")
20+
println("Negative Numbers: $negatives")
2121
}
2222
```
2323

examples/05_stdlib/04_map.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# map
22

3-
*map* is an extension function defined in the standard library that can be used to transform collection into another collection. It takes a transformer as an lambda-paramters.
3+
*map* is an extension function defined in the standard library that can be used to transform collection into another collection. It takes a transformer as an lambda-parameters.
44

55
<div class="language-kotlin" theme="idea" data-min-compiler-version="1.3">
66

examples/05_stdlib/05_existential.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ fun main() {
7979
val allLess6 = numbers.none { it > 6 } // 3
8080
//sampleEnd
8181

82-
println("Numbers: numbers")
82+
println("Numbers: $numbers")
8383
println("All numbers are even: $allEven")
8484
println("No element greater than 6: $allLess6")
8585
}

examples/05_stdlib/06_find.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ fun main() {
2727
1. Define collection of different words.
2828
2. Looking for the first word starting with "some".
2929
3. Looking for the last word starting with "some".
30-
4. Lookign for the first word containing "nothing".
30+
4. Looking for the first word containing "nothing".

examples/05_stdlib/11_zip.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ fun main() {
2424

2525
1. Define two collections.
2626
2. Zip them into pairs using infix notation.
27-
3. Zip them concatinating together.
27+
3. Zip them concatenating together.

0 commit comments

Comments
 (0)