Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

📚 The CoCalc Library - books, templates and other resources

132922 views
License: OTHER
1
results = []
2
for x in data:
3
if is_even(x): # even
4
y = delayed(double)(x)
5
else: # odd
6
y = delayed(inc)(x)
7
results.append(y)
8
9
total = delayed(sum)(results)
10