jweinst1
3/4/2016 - 7:45 PM

a custom integer operator in swift that allows you to concate integers

a custom integer operator in swift that allows you to concate integers

infix operator <+> {}

func <+> (m:Int, n:Int) -> Int {
    return Int(String(m) + String(n))!
}

5 <+> 6
//56

66 <+> 88
//6688