Skip to content

Instantly share code, notes, and snippets.

@tolitius
Created January 24, 2013 18:19
Show Gist options
  • Save tolitius/4625998 to your computer and use it in GitHub Desktop.
Save tolitius/4625998 to your computer and use it in GitHub Desktop.
def stopsAt(station: Station) = {
for {
train <- trainsAt( station )
schedule <- train.schedule.filter(_._2 == station)
} yield (schedule._1, train)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment