TypeCast/ipsavitsky
TypeCast/JuliaZ
f1from functools import wrapsf1from functools import wraps
22
33
n4def cast(typ):n4def cast(type):
5    def cst(fn):5    def functional(func):
6        @wraps(fn)6        @wraps(func)
7        def interior(*args):7        def argument(*args):
8            return typ(fn(*args))8            return type(func(*args))
9        return interior
10    return cst
119
n12# @cast(list)n10        return argument
13# def fun(a, b):
14#     return a * 2 + b
15# print(*fun("QW", "er"))
16# print(*fun(sorted("WDC"), sorted("rfv")))
17# print(fun.__name__)
1811
tt12    return functional
13 
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op