def functional(ifunctional):
@wraps(ifunctional)<EOL>def wrapper(fn, *args, **kw):<EOL><INDENT>fn = ifunctional(fn)<EOL>if args or kw:<EOL><INDENT>return fn(*args, **kw)<EOL><DEDENT>else:<EOL><INDENT>return fn<EOL><DEDENT><DEDENT>return wrapper<EOL>
fun(fn) -> function or
fun(fn, args...) -> call of fn(args...)
:param ifunctional: f
:return: decorated function