зеркало из
https://github.com/iharh/notes.git
synced 2025-10-29 20:56:06 +02:00
20 строки
276 B
Plaintext
20 строки
276 B
Plaintext
def makebold(fn):
|
|
def wrapped():
|
|
return "<b>" + fn() + "</b>"
|
|
return wrapped
|
|
|
|
@makebold
|
|
def hello():
|
|
return "Hello All"
|
|
|
|
> print(hello())
|
|
<b>Hello All</b>
|
|
|
|
curry:
|
|
|
|
def addClosure(val1):
|
|
def closure(val2):
|
|
return val1 + val2
|
|
return closure
|
|
|