Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.

Commit

Permalink
Merge pull request #24 from UrbanCompass/readme
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
wesbillman authored Dec 12, 2016
2 parents e0bf6c2 + cc1dbe8 commit 85ad16f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,21 @@ int.asObservable().subscribe(

int.value = 42
```

## Miscellaneous Observables

```swift
let just = Just(1) // always returns the initial value (1 in this case)

enum TestError: Error {
case test
}
let failure = Fail(TestError.test) //always fail with error

let n = 5
let replay = Replay(n) // replays the last N events when a new observer subscribes
```

## Subscribing to Control Events

```swift
Expand Down

0 comments on commit 85ad16f

Please sign in to comment.