Skip to content

Instantly share code, notes, and snippets.

@cbetta
Created November 30, 2012 15:34
Show Gist options
  • Save cbetta/4176464 to your computer and use it in GitHub Desktop.
Save cbetta/4176464 to your computer and use it in GitHub Desktop.
def namedObjectsNear(lat: Double, long: Double): Seq[Venue] = {
def call(lat: Double, long: Double, distances: List[Int]): Seq[Venue] = {
var res = List[Venue]()
var remainingDistances = distances
while (distance.tail.size != 0 && res.size <= 20)
res = API.getResults(lat, long, distance)
remainingDistances = remainingDistances.tail
res
}
val distances = List(100, 300, 1000, 3000)
call(lat, long, distances)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment