Skip to content

Instantly share code, notes, and snippets.

View monyschuk's full-sized avatar

Mark Onyschuk monyschuk

  • Toronto, Canada
View GitHub Profile
@mminer
mminer / Reducer.swift
Created November 13, 2017 02:32
Example of a Redux-esque store powered by RxSwift.
typealias Reducer<StateType, ActionType> = (_ state: StateType, _ action: ActionType) -> StateType
public struct Bezier {
public enum PolygonStyle { case flatsingle, flatdouble, curvesingle, curvedouble, flattruple, curvetruple }
static func polygon(
sides sideCount: Int = 5,
radius: CGFloat = 50.0,
startAngle offset: CGFloat = 0.0,
style: PolygonStyle = .curvesingle,
percentInflection: CGFloat = 0.0) -> BezierPath
{
guard sideCount >= 3 else {