func doubles(a: int) -> int -> int { assert a == 2; func doubler(b: int) -> int { return b*2+a; } return doubler; } doubler_: int -> int = doubles(2); debug_print(doubler_("5"));