Skip to content

Instantly share code, notes, and snippets.

@tsekityam
Created April 22, 2017 17:26
Show Gist options
  • Save tsekityam/93b52a5c9c63907f61e6f20c426596b4 to your computer and use it in GitHub Desktop.
Save tsekityam/93b52a5c9c63907f61e6f20c426596b4 to your computer and use it in GitHub Desktop.
let first = 0
let last = dataSource.lines.lines.count
let missing = dataSource.lines.computeMissing(first, last)
for (f, l) in missing {
Swift.print("requesting missing: \(f)..\(l)")
// output: requesting missing: 0..1
_ = dataSource.document.sendRpc("request_lines", params: [f, l])
}
let line = getLine(0) // line == nil, but why?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment