Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
hoangchungk53qx1 committed Nov 11, 2023
1 parent 43cd7e5 commit 5caeb69
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ dependencies {
## Table of contents

- Create
- [`concat`](#concat--plus)
- [`concat`](#concat)
- [`defer`](#defer)
- [`flowFromSuspend`](#flowfromsuspend)
- [`interval`](#interval)
Expand All @@ -121,7 +121,6 @@ dependencies {
- [`amb`](#race--amb)
- [`range`](#range)
- [`timer`](#timer)
- [`plus`](#concat--plus)

- Intermediate operators
- [`bufferCount`](#buffercount--chunked)
Expand All @@ -131,7 +130,7 @@ dependencies {
- [`castNullable`](#cast--castnotnull--castnullable--safeCast)
- [`chunked`](#buffercount--chunked)
- [`safeCast`](#cast--castnotnull--castnullable--safeCast)
- [`concatWith`](#concatwith)
- [`concatWith`](#concatwith--plus)
- [`startWith`](#startwith)
- [`flatMapFirst`](#flatmapfirst--exhaustmap)
- [`exhaustMap`](#flatmapfirst--exhaustmap)
Expand Down Expand Up @@ -162,6 +161,7 @@ dependencies {
- [`throttleTime`](#throttletime)
- [`withLatestFrom`](#withlatestfrom)
- [`zipWithNext`](#pairwise--zipWithNext)
- [`plus`](#concatwith--plus)

#### bufferCount / chunked

Expand Down Expand Up @@ -201,7 +201,7 @@ bufferCount: [8, 9]

----

#### concat / plus
#### concat

- Similar to [RxJS concat](https://rxjs.dev/api/index/function/concat)
- Similar
Expand All @@ -215,13 +215,6 @@ concat(
flow1 = flowOf(1, 2, 3),
flow2 = flowOf(4, 5, 6)
).collect { println("concat: $it") }

println("---")

val flow1 = flowOf(1, 2, 3)
val flow2 = flowOf(4, 5, 6)

(flow1 + flow2).collect { println("plus: $it") }
```

Output:
Expand All @@ -233,13 +226,6 @@ concat: 3
concat: 4
concat: 5
concat: 6
---
plus: 1
plus: 2
plus: 3
plus: 4
plus: 5
plus: 6
```

----
Expand Down Expand Up @@ -535,7 +521,7 @@ safeCast: null

----

#### concatWith
#### concatWith / plus

- Similar to [RxJS concatWith](https://rxjs.dev/api/operators/concatWith)
- Similar
Expand All @@ -547,6 +533,13 @@ Returns a `Flow` that emits the items emitted from the current `Flow`, then the
flowOf(1, 2, 3)
.concatWith(flowOf(4, 5, 6))
.collect { println("concatWith: $it") }

println("---")

val flow1 = flowOf(1, 2, 3)
val flow2 = flowOf(4, 5, 6)

(flow1 + flow2).collect { println("plus: $it") }
```

Output:
Expand All @@ -558,6 +551,13 @@ concatWith: 3
concatWith: 4
concatWith: 5
concatWith: 6
---
plus: 1
plus: 2
plus: 3
plus: 4
plus: 5
plus: 6
```

----
Expand Down

0 comments on commit 5caeb69

Please sign in to comment.