Skip to content

Instantly share code, notes, and snippets.

@rnapier rnapier/FrobulateGo.swift
Last active Aug 29, 2015

Embed
What would you like to do?
// The Go-way (from http://robnapier.net/go-is-a-shop-built-jig)
func frobulate() -> NSError? {
if self.thingsToFrobulate > 0 {
if let error = logit(FrobulatingMessage) {
return error
}
if let error = self.removeOldest() {
return error
}
let (youngest, error) = self.processOld()
if error != nil {
return error
}
if let error = self.doNewThing(youngest!) {
return error
}
}
return self.cleanup()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.