Skip to content

Instantly share code, notes, and snippets.

@mariusk
Last active August 29, 2015 14:13
Show Gist options
  • Save mariusk/76e0f1a9830aa3057df5 to your computer and use it in GitHub Desktop.
Save mariusk/76e0f1a9830aa3057df5 to your computer and use it in GitHub Desktop.
arr = [false, false, false, true, false, false, true, false, true, false]
Rx.Observable.from(arr)
.pairwise().filter((val) -> val[0])
.subscribe(
(val) -> console.log "val", val
)
# Outputs:
# val [ true, false ]
# val [ true, false ]
# val [ true, false ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment