Skip to content

Instantly share code, notes, and snippets.

View startover205's full-sized avatar

Sam Yang startover205

  • Taoyuan, Taiwan
View GitHub Profile
@startover205
startover205 / ChainedCompositionExample.swift
Last active May 30, 2021 14:03
An example of composition.
import Foundation
protocol VideoFilter {
func addFilter(completion: @escaping (Bool) -> Void)
}
struct ChainedFilter: VideoFilter {
let primary: VideoFilter
let next: VideoFilter
print('Hello World!')