Skip to content

Instantly share code, notes, and snippets.

View a2's full-sized avatar
🐼

Alex Akers a2

🐼
View GitHub Profile
@a2
a2 / guard.swift
Created August 24, 2016 15:27 — forked from CastIrony/guard.swift
guard !arguments.isEmpty,
nums.count = arguments.count
else {
print("Usage: \(appName) <list-of-positive-integers>")
exit(-1)
}
infix operator <+ {}
func <+ <C: RangeReplaceableCollectionType>(inout collection: C, element: C.Generator.Element) {
collection.append(element)
}
var array = [String]()
array <+ "Foo"
array <+ "Bar"
import UIKit
protocol myProtocol: class {
func dothatthing () -> Void
}
var array : [protocol<myProtocol>] = []
class A : myProtocol {
func dothatthing() {
/***
* Bitmap Loader
* Copyright © 2013 Matthew Tole
*
* Version 2.0.2
***/
#include <pebble.h>
#include "bitmap-loader.h"