Created
November 1, 2017 14:28
-
-
Save chriswill0w/00b490a62892b525589e880a2ae5f452 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private extension ObservableType { | |
func withPrevious(startWith first: E) -> Observable<(E, E)> { | |
return scan((first, first)) { ($0.1, $1) }.skip(1) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment