Skip to content

Commit

Permalink
Refactoring. Using black code style
Browse files Browse the repository at this point in the history
  • Loading branch information
gil9red committed Apr 27, 2023
1 parent 5be023f commit 37f1ae6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions currying__examples/hello_world.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

__author__ = 'ipetrash'
__author__ = "ipetrash"


# SOURCE: https://ru.wikipedia.org/wiki/Каррирование
Expand All @@ -15,9 +15,11 @@ def foo(x):
def a(y):
def b(z):
return my_sum(x, y, z)

return b

return a


print(foo(1)(2)(3)) # 6
print(foo(1)(2)(3)) # 6
print(foo("1")("2")("3")) # 123

0 comments on commit 37f1ae6

Please sign in to comment.