diff --git a/__pycache__/compose.cpython-37.pyc b/__pycache__/compose.cpython-37.pyc new file mode 100644 index 0000000..aa12b59 Binary files /dev/null and b/__pycache__/compose.cpython-37.pyc differ diff --git a/compose.py b/compose.py index 28e467a..c9418f2 100644 --- a/compose.py +++ b/compose.py @@ -4,7 +4,9 @@ class Composition: self.g = g def __call__(self, *args, **kwargs): - return self.f(self.g(*args, **kwargs)) + if self.g is None: + return self.f(*args, **kwargs) + return self.f(self.g(*args, **kwargs)) @property def __name__(self):