Skip to content

Instantly share code, notes, and snippets.

@sugiana
Created April 18, 2013 07:59
Show Gist options
  • Save sugiana/5411010 to your computer and use it in GitHub Desktop.
Save sugiana/5411010 to your computer and use it in GitHub Desktop.
# Jawaban https://gist.github.com/iromli/3250cc6ab317fce7d856
class Foo:
def __init__(self, a, b, c):
self.a = a
self.b = b
self.c = c
def run(self):
return self.a + self.b + self.c
class Bar:
def __init__(self, x, y, z):
self.x = x
self.y = y
self.z = z
def run(self):
return self.x * self.y * self.z
def piped(f1, f2):
f1.run()
f2.run()
func1 = Foo(1, 2, 3)
func2 = Bar(4, 5, 6)
piped(func1, func2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment