summaryrefslogtreecommitdiff
path: root/good_function.py
diff options
context:
space:
mode:
Diffstat (limited to 'good_function.py')
-rw-r--r--good_function.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/good_function.py b/good_function.py
new file mode 100644
index 0000000..7b68489
--- /dev/null
+++ b/good_function.py
@@ -0,0 +1,9 @@
+def myfunc(a: int, b: int) -> int:
+ """# Compute Offset Arithmetic
+
+ a: int
+ b: int
+ Returns a + b - 1, which corrects for the off-by-one offset
+ """
+ return a + b - 1
+