Articles tagged 'programming'

Either in Swift

Friday, August 26, 2016 A.D.

Let's suppose we have an iOS application that requires users to log in. Here's a User struct: 1 2 3 4 5 struct User { let name: String let occupation: String let hometown: String } And here's a simple function that might handle the login process...… .

I am ErrorType

Thursday, July 28, 2016 A.D.

I'm going to be talking about Swift's ErrorType in the next few posts, and I thought I'd talk a little more about it since the built in documentation on it is… lacking. It's an empty protocol! What good is that? Well, it turns out that anything that...… .

FizzBuzz Counts, Improved

Monday, July 25, 2016 A.D.

I improved the fizzbuzz solution in scheme from my previous post. I mentioned that if I added a second function inside of the main function, I could avoid passing in the n argument over and over again. I don't know if it's a change for the better but...… .

Fizzbuzz Counts

Sunday, July 17, 2016 A.D.

I forget where I saw it, but I recently saw a variation of the FizzBuzz problem wherein instead of printing numbers and substituting 'fizz', 'buzz', and 'fizz buzz' where appropriate, the goal is to return the number of times those words would be printed...… .

Overloading in Swift

Tuesday, June 28, 2016 A.D.

You can overload functions in Swift. Let's try it!… .