| TypeCast/ansemenov | TypeCast/Beka00 | ||||
|---|---|---|---|---|---|
| f | 1 | from functools import wraps | f | 1 | from functools import wraps |
| 2 | 2 | ||||
| 3 | 3 | ||||
| t | 4 | def cast(t): | t | 4 | def cast(arg): |
| 5 | def decorator(fun): | 5 | def one(arg2): | ||
| 6 | @wraps(fun) | 6 | @wraps(arg2) | ||
| 7 | def newfun(*args): | 7 | def fun(*args): | ||
| 8 | return t(fun(*args)) | 8 | return arg(arg2(*args)) | ||
| 9 | return newfun | 9 | return fun | ||
| 10 | return decorator | 10 | return one | ||
| 11 | 11 | ||||
| Legends | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
| |||||||||