Skip to content

Instantly share code, notes, and snippets.

@nambrot
Created December 2, 2017 23:30
Show Gist options
  • Select an option

  • Save nambrot/126ff92d32d9bb22c06e04a3fe511d8b to your computer and use it in GitHub Desktop.

Select an option

Save nambrot/126ff92d32d9bb22c06e04a3fe511d8b to your computer and use it in GitHub Desktop.
val alertStream = combinedStream
.filter {
case (_, (bloodPressureEvents, heartRateEvents)) =>
bloodPressureEvents.exists(_.systolic < 100) && heartRateEvents.exists(_.heartRate > 100)
case _ => false
}.map {
case (id, (_, _)) => (id, s"User $id has a problem")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment