https://dagster.io/ logo
#ask-community
Title
# ask-community
a

Alexander Whillas

07/22/2022, 12:43 AM
hey, I don't know if you guys have this already but providing a compose function might clean up the examples a little i.e.
Copy code
compose = lambda *F: reduce(lambda f, g: lambda x: f(g(x)), F)

# so
pipeline = compose(op1, op2, op3, ...)
result = pipeline(data)

# instead of
result = op1()
result = op2(result)
result = op3(result)
might be good for subgraphs and since your doing monadic error handling already (i assume) this would be a good fit (and you can do some other things under to hood if need be)