Avatar
@swift-main struct Adder { var base: Int func callAsFunction(_ x: Int) -> Int { return x + base } } var adder = Adder(base: 3) [1].map(adder).forEach { print($0) }