Skip to content

Instantly share code, notes, and snippets.

@comfly comfly/shit.swift
Last active Apr 21, 2016

What would you like to do?
import Foundation
infix operator <| { associativity right precedence 95 }
func <|<A, R>(@noescape f: A -> R, a: A) -> R {
return f(a)
func <|<A, B, R>(@noescape f: (A, B) -> R, a: (A, B)) -> R {
return f(a.0, a.1)
let a = (10, "String")
func f(a: (Int, String)) -> String {
return "TUPLE"
func f(a: Int, _ b: String) -> String {
return "2ARY"
let k = f(_:_:) <| a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.