Skip to content

Instantly share code, notes, and snippets.

@jslinker
Created March 24, 2015 15:51
Show Gist options
  • Save jslinker/782208045b4cbe98ad60 to your computer and use it in GitHub Desktop.
Save jslinker/782208045b4cbe98ad60 to your computer and use it in GitHub Desktop.
data = data.map { item -> (t, CGFloat) in
var score: CGFloat!
autoreleasepool {
score = self.converter(item).scoreAgainst(string)
}
return (item, score)
}
.filter { return $0.1 > CGFloat(0) }
.sorted { return $0.1 > $1.1 }
.map { return $0.0 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment