Stateful Loops and Swift Sequence Functions

Given the question:

“I’ve come across a situation a number of times where I write code that has to try something one or more times using a `repeat…while` loop and the condition relies upon variables that should be declared within the scope of the loop.”

@ericasadun shows two examples using Swift sequence functions. To complete the discussion, Erica writes a function that:

“…creates a stateful repeat-while loop, which is more or less what I believe the writer was aiming for. It uses a Boolean test, hides the use of sequence(state:next:), and allows a trailing closure for the body of the loop.”

Stateful loops and using Swift sequence functions.

Facebook SDK for Swift (Beta)

@nlutsenko of the Facebook team:

“Earlier this year we provided a complete Swift implementation for Bolts that exposes many native Swift features, including proper generic types, support for value types, and native Swift error handling.”

Building on that idea, the Facebook SDK for Swift beta has been announced.

Continue reading

Google Maps Utilities for iOS

“This open-source library contains classes that are useful for a wide range of applications using the Google Maps SDK for iOS.”

Here are the two primary takeaways :

  1. Display of a large number of points
  2. Indexes 2D geometry points & performs 2D range queries

Continue reading