Skip to content
This repository was archived by the owner on Oct 10, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix typos
  • Loading branch information
wmorgue committed Nov 3, 2018
commit 62fcea927263116c1e1b01a0668de2f7e18ffc0b
4 changes: 2 additions & 2 deletions _examples/nullSafety.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Null Safety
---


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

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

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

### Working with nulls

Expand Down
2 changes: 1 addition & 1 deletion _examples/ranges.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ fun main(args: Array<String>) {
4. Increment step for char ranges are also valid
5. To create a range in _reverse_ order use `downTo()` function
6. Ranges are also useful in `if` statements
7. `!in` is oposite of `in`. Statement is equal to `_false_`
7. `!in` is opposite of `in`. Statement is equal to `_false_`


4 changes: 2 additions & 2 deletions examples/01_introduction/04_Null Safety.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Null Safety

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

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

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

## Working with nulls

Expand Down
2 changes: 1 addition & 1 deletion examples/02_control_flow/03_Ranges.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ fun main() {
4. Increment step for char ranges are also valid
5. To create a range in _reverse_ order use `downTo()` function
6. Ranges are also useful in `if` statements
7. `!in` is oposite of `in`. Statement is equal to `_false_`
7. `!in` is opposite of `in`. Statement is equal to `_false_`

2 changes: 1 addition & 1 deletion examples/03_special_classes/01_Data classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ fun main() {
2. Auto-generated `equals` makes data classes with equal information equals as well.
3. Equal data classes have equal `hashCode()`.
4. Predefined `copy` function makes it easy to obtain a new instance.
5. Property values can be changed on copy. The order corresponds to contructor argument order.
5. Property values can be changed on copy. The order corresponds to constructor argument order.
6. It is possible to change only some values.
7. Use named arguments to change the second value without altering the first one.
8. Additionally special `componentN` functions are generated.
6 changes: 3 additions & 3 deletions examples/05_stdlib/03_filter.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# filter

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

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

Expand All @@ -16,8 +16,8 @@ fun main() {
//sampleEnd

println("Numbers: $numbers")
println("Positive Numbers: positives")
println("Negative Numbers: negatives")
println("Positive Numbers: $positives")
println("Negative Numbers: $negatives")
}
```

Expand Down
2 changes: 1 addition & 1 deletion examples/05_stdlib/04_map.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# map

*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.
*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.

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

Expand Down
2 changes: 1 addition & 1 deletion examples/05_stdlib/05_existential.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ fun main() {
val allLess6 = numbers.none { it > 6 } // 3
//sampleEnd

println("Numbers: numbers")
println("Numbers: $numbers")
println("All numbers are even: $allEven")
println("No element greater than 6: $allLess6")
}
Expand Down
2 changes: 1 addition & 1 deletion examples/05_stdlib/06_find.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ fun main() {
1. Define collection of different words.
2. Looking for the first word starting with "some".
3. Looking for the last word starting with "some".
4. Lookign for the first word containing "nothing".
4. Looking for the first word containing "nothing".
2 changes: 1 addition & 1 deletion examples/05_stdlib/11_zip.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ fun main() {

1. Define two collections.
2. Zip them into pairs using infix notation.
3. Zip them concatinating together.
3. Zip them concatenating together.
2 changes: 1 addition & 1 deletion examples/07_Delegation/02_DelegatedProperties.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ fun main() {
1. Delegated property `p` of type `String`
2. Delegation methods. For immutable property only `getValue` is required.

### Stanard delegates
### Standard delegates

Kotlin standard library contains bunch of useful delegates, like `lazy`, `observable`, etc.

Expand Down