projects
/
swc-testing-nose.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
53eb467
)
Demo module for extreme test-driven development, if we get there.
test-davis-2013-07-cmu
author
Erik M. Bray
<embray@stsci.edu>
Sun, 28 Jul 2013 15:38:18 +0000
(11:38 -0400)
committer
W. Trevor King
<wking@tremily.us>
Sat, 9 Nov 2013 18:33:56 +0000
(10:33 -0800)
python/sw_engineering/scan.py
[new file with mode: 0644]
patch
|
blob
diff --git a/python/sw_engineering/scan.py
b/python/sw_engineering/scan.py
new file mode 100644
(file)
index 0000000..
99cb96f
--- /dev/null
+++ b/
python/sw_engineering/scan.py
@@ -0,0
+1,10
@@
+def scan(lst):
+ total = 0
+ last = None
+ if len(lst) == 0:
+ return total
+ for item in lst:
+ if last is None or item > last:
+ total += item
+ last = item
+ return total