Skip to content

Instantly share code, notes, and snippets.

@jeremytregunna
Created March 9, 2017 21:02
Show Gist options
  • Select an option

  • Save jeremytregunna/f4c8edac50f11ed5dda22e2b3822b422 to your computer and use it in GitHub Desktop.

Select an option

Save jeremytregunna/f4c8edac50f11ed5dda22e2b3822b422 to your computer and use it in GitHub Desktop.
precedencegroup BindingPrecedence {
associativity: left
lowerThan: DefaultPrecedence
higherThan: TernaryPrecedence
}
infix operator |>: BindingPrecedence
public func |>(f1: @escaping Filter, f2: @escaping Filter) -> Filter {
return { image in
f2(f1(image))
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment