| TypeCast/JuliaZ | TypeCast/VladislavP | ||||
|---|---|---|---|---|---|
| f | 1 | from functools import wraps | f | 1 | from functools import wraps |
| 2 | 2 | ||||
| 3 | 3 | ||||
| n | 4 | def cast(type): | n | 4 | def cast(t): |
| 5 | def functional(func): | 5 | def decor(func): | ||
| 6 | @wraps(func) | 6 | @wraps(func) | ||
| n | 7 | def argument(*args): | n | 7 | def wrapper(*args): |
| 8 | return type(func(*args)) | 8 | return t(func(*args)) | ||
| 9 | return wrapper | ||||
| 10 | return decor | ||||
| 9 | 11 | ||||
| t | 10 | return argument | t | ||
| 11 | |||||
| 12 | return functional | ||||
| 13 | |||||
| Legends | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
| |||||||||