Sunday, 8 June 2014

Partioning Arrays

Been taking time to try and decipher the Swift collection hierarchy (with minimal success) and understanding CloudKit (looks promising and will feature in later posts) so not had much time to finish off the async example posted earlier.

The issue with the ! operator if anyone guessed is the fact that the result wouldn't actually get calculated until after the async call had finished as it was wrapped in a closure which had delayed execution. 

Anyhow, a bit more code to keep things going. Partioning and Choose this time, both making use of the |> operator discussed earlier.

The purpose of these functions will become more apparent as time progresses and things build up into more concrete examples.

No comments:

Post a Comment