Skip to content

Instantly share code, notes, and snippets.

View donarb's full-sized avatar

Don Arbow donarb

View GitHub Profile
@donarb
donarb / Hexagon Ripple.swift
Last active February 16, 2017 02:38 — forked from d-ronnqvist/Hexagon Ripple.swift
Hexagon Ripple in a Swift Playground
//: Modified for Swift 3
import Cocoa
import AppKit
import QuartzCore
import PlaygroundSupport
// Parameters that define the style
let hexSideLength: CGFloat = 15.0
@donarb
donarb / ProtocolAssociatedType.swift
Created February 2, 2017 06:05 — forked from troystribling/ProtocolAssociatedType.swift
A swift protocol with associated type used as type parameter in generic function
protocol Thing {
typealias argType
func doit(val:argType) -> argType
}
class IntThing : Thing {
func doit(val: Int) -> Int {
return val + 1
}
}