From 7b5c628e89c834a3e8f018be0b1f3f146965bf0f Mon Sep 17 00:00:00 2001 From: Trashtalk Date: Fri, 31 May 2019 16:02:13 +0200 Subject: [PATCH 01/13] Added a proof for the Euclidean Algorithm --- contents/euclidean_algorithm/euclidean_algorithm.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contents/euclidean_algorithm/euclidean_algorithm.md b/contents/euclidean_algorithm/euclidean_algorithm.md index 4ff49152f..26c308501 100644 --- a/contents/euclidean_algorithm/euclidean_algorithm.md +++ b/contents/euclidean_algorithm/euclidean_algorithm.md @@ -166,6 +166,12 @@ Here's a video on the Euclidean algorithm: +## Proof + +Some intuition as to why the Euclidean Algorithm works lies in it's proof. Only a proof for the subtraction method will be given at this point, but the modular version follows the same line of reasoning. + +Given two positive integers $$a$$ and $$b$$, they have a greatest common divisor $$d$$. There is always a common divisor, because every number is divisable by 1. Since $$a$$ and $$b$$ is divisable by $$d$$, $$a - b$$ is also divisable by $$d$$ ($$b < a$$). Let's call this value $$c$$. Now we once more have two numbers $$b$$ and $$c$$, which are both divisable by $$d$$. This process can be continued until the values are equal: this is the greatest common divisor $$d$$. + ## Example Code {% method %} From 131ae549231b39174f6379b0247af56efc827b9c Mon Sep 17 00:00:00 2001 From: Trashtalk Date: Fri, 31 May 2019 16:06:17 +0200 Subject: [PATCH 02/13] Revert "Added a proof for the Euclidean Algorithm" This reverts commit 7b5c628e89c834a3e8f018be0b1f3f146965bf0f. --- contents/euclidean_algorithm/euclidean_algorithm.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/contents/euclidean_algorithm/euclidean_algorithm.md b/contents/euclidean_algorithm/euclidean_algorithm.md index 26c308501..4ff49152f 100644 --- a/contents/euclidean_algorithm/euclidean_algorithm.md +++ b/contents/euclidean_algorithm/euclidean_algorithm.md @@ -166,12 +166,6 @@ Here's a video on the Euclidean algorithm: -## Proof - -Some intuition as to why the Euclidean Algorithm works lies in it's proof. Only a proof for the subtraction method will be given at this point, but the modular version follows the same line of reasoning. - -Given two positive integers $$a$$ and $$b$$, they have a greatest common divisor $$d$$. There is always a common divisor, because every number is divisable by 1. Since $$a$$ and $$b$$ is divisable by $$d$$, $$a - b$$ is also divisable by $$d$$ ($$b < a$$). Let's call this value $$c$$. Now we once more have two numbers $$b$$ and $$c$$, which are both divisable by $$d$$. This process can be continued until the values are equal: this is the greatest common divisor $$d$$. - ## Example Code {% method %} From 74d7f61bb491d98036f2418d9755e8b5785bd21a Mon Sep 17 00:00:00 2001 From: Trashtalk Date: Thu, 6 Jun 2019 14:45:43 +0200 Subject: [PATCH 03/13] Added docstrings and changed some code for brevity --- .../code/clisp/euclidean_algorithm.lisp | 32 +++++++++---------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/contents/euclidean_algorithm/code/clisp/euclidean_algorithm.lisp b/contents/euclidean_algorithm/code/clisp/euclidean_algorithm.lisp index cff5ab29f..b8d1ef399 100644 --- a/contents/euclidean_algorithm/code/clisp/euclidean_algorithm.lisp +++ b/contents/euclidean_algorithm/code/clisp/euclidean_algorithm.lisp @@ -1,33 +1,31 @@ -;;;; Euclid algorithm implementation +;;;; Euclid algorithm implementation in Common Lisp (defun euclid-sub (a b) + "Finds the greatest common divsor for any two integers" (euclid-sub* (abs a) (abs b))) (defun euclid-sub* (a b) + "Finds the greatest common divisor for any two positive integers" (if (eq a b) - a - (if (> a b) - (euclid-sub* (- a b) b) - (euclid-sub* a (- b a))))) + a + (if (> a b) + (euclid-sub* (- a b) b) + (euclid-sub* a (- b a))))) (defun euclid-mod (a b) + "Finds the greatest common divisor for any two integers" (if (zerop b) - (abs a) - (euclid-mod b (mod a b)))) + (abs a) + (euclid-mod b (mod a b)))) -(print - (euclid-sub (* 64 67) - (* 64 81))) -(print - (euclid-mod (* 128 12) - (* 128 77))) +(print (euclid-sub (* 64 67) (* 64 81))) +(print (euclid-mod (* 128 12) (* 128 77))) -;; built-in function: (gcd 80 40) -;; quick test -(assert +; quick test +(assert (= (euclid-sub (* 64 67) (* 64 81)) (gcd (* 64 67) (* 64 81)))) -(assert +(assert (= (euclid-mod (* 64 67) (* 64 81)) (gcd (* 64 67) (* 64 81)))) From 5c4dc6b9c1b0dded8e33dcc8be265d0fec583b5f Mon Sep 17 00:00:00 2001 From: Trashtalk Date: Mon, 10 Jun 2019 16:26:20 +0200 Subject: [PATCH 04/13] Slightly changed the .md file to fit the changes. --- contents/euclidean_algorithm/euclidean_algorithm.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contents/euclidean_algorithm/euclidean_algorithm.md b/contents/euclidean_algorithm/euclidean_algorithm.md index 4ff49152f..c2dc106ba 100644 --- a/contents/euclidean_algorithm/euclidean_algorithm.md +++ b/contents/euclidean_algorithm/euclidean_algorithm.md @@ -20,7 +20,7 @@ The algorithm is a simple way to find the *greatest common divisor* (GCD) of two {% sample lang="js" %} [import:15-29, lang="javascript"](code/javascript/euclidean_example.js) {% sample lang="lisp" %} -[import:3-12, lang="lisp"](code/clisp/euclidean_algorithm.lisp) +[import:3-13, lang="lisp"](code/clisp/euclidean_algorithm.lisp) {% sample lang="py" %} [import:11-22, lang="python"](code/python/euclidean_example.py) {% sample lang="haskell" %} @@ -97,7 +97,7 @@ Modern implementations, though, often use the modulus operator (%) like so {% sample lang="js" %} [import:1-13, lang="javascript"](code/javascript/euclidean_example.js) {% sample lang="lisp" %} -[import:13-17, lang="lisp"](code/clisp/euclidean_algorithm.lisp) +[import:15-19, lang="lisp"](code/clisp/euclidean_algorithm.lisp) {% sample lang="py" %} [import:1-9, lang="python"](code/python/euclidean_example.py) {% sample lang="haskell" %} From 2909c78d1bd3878584584796bfbd3e6beaaf2994 Mon Sep 17 00:00:00 2001 From: Trashtalk Date: Mon, 10 Jun 2019 16:27:56 +0200 Subject: [PATCH 05/13] Changed the filename to be shorter --- .../code/clisp/{euclidean_algorithm.lisp => euclidean.lisp} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename contents/euclidean_algorithm/code/clisp/{euclidean_algorithm.lisp => euclidean.lisp} (100%) diff --git a/contents/euclidean_algorithm/code/clisp/euclidean_algorithm.lisp b/contents/euclidean_algorithm/code/clisp/euclidean.lisp similarity index 100% rename from contents/euclidean_algorithm/code/clisp/euclidean_algorithm.lisp rename to contents/euclidean_algorithm/code/clisp/euclidean.lisp From 44e5523e8cf20955f412d920c2c0a32eddbc20f2 Mon Sep 17 00:00:00 2001 From: Trashtalk Date: Mon, 10 Jun 2019 16:45:29 +0200 Subject: [PATCH 06/13] Fixed the namechange to work --- .../code/clisp/euclidean.lisp | 31 ------------------- .../euclidean_algorithm.md | 6 ++-- 2 files changed, 3 insertions(+), 34 deletions(-) delete mode 100644 contents/euclidean_algorithm/code/clisp/euclidean.lisp diff --git a/contents/euclidean_algorithm/code/clisp/euclidean.lisp b/contents/euclidean_algorithm/code/clisp/euclidean.lisp deleted file mode 100644 index b8d1ef399..000000000 --- a/contents/euclidean_algorithm/code/clisp/euclidean.lisp +++ /dev/null @@ -1,31 +0,0 @@ -;;;; Euclid algorithm implementation in Common Lisp - -(defun euclid-sub (a b) - "Finds the greatest common divsor for any two integers" - (euclid-sub* (abs a) (abs b))) - -(defun euclid-sub* (a b) - "Finds the greatest common divisor for any two positive integers" - (if (eq a b) - a - (if (> a b) - (euclid-sub* (- a b) b) - (euclid-sub* a (- b a))))) - -(defun euclid-mod (a b) - "Finds the greatest common divisor for any two integers" - (if (zerop b) - (abs a) - (euclid-mod b (mod a b)))) - -(print (euclid-sub (* 64 67) (* 64 81))) -(print (euclid-mod (* 128 12) (* 128 77))) - -; quick test -(assert - (= (euclid-sub (* 64 67) (* 64 81)) - (gcd (* 64 67) (* 64 81)))) - -(assert - (= (euclid-mod (* 64 67) (* 64 81)) - (gcd (* 64 67) (* 64 81)))) diff --git a/contents/euclidean_algorithm/euclidean_algorithm.md b/contents/euclidean_algorithm/euclidean_algorithm.md index c2dc106ba..c64906c9a 100644 --- a/contents/euclidean_algorithm/euclidean_algorithm.md +++ b/contents/euclidean_algorithm/euclidean_algorithm.md @@ -20,7 +20,7 @@ The algorithm is a simple way to find the *greatest common divisor* (GCD) of two {% sample lang="js" %} [import:15-29, lang="javascript"](code/javascript/euclidean_example.js) {% sample lang="lisp" %} -[import:3-13, lang="lisp"](code/clisp/euclidean_algorithm.lisp) +[import:3-13, lang="lisp"](code/clisp/euclidean.lisp) {% sample lang="py" %} [import:11-22, lang="python"](code/python/euclidean_example.py) {% sample lang="haskell" %} @@ -97,7 +97,7 @@ Modern implementations, though, often use the modulus operator (%) like so {% sample lang="js" %} [import:1-13, lang="javascript"](code/javascript/euclidean_example.js) {% sample lang="lisp" %} -[import:15-19, lang="lisp"](code/clisp/euclidean_algorithm.lisp) +[import:15-19, lang="lisp"](code/clisp/euclidean.lisp) {% sample lang="py" %} [import:1-9, lang="python"](code/python/euclidean_example.py) {% sample lang="haskell" %} @@ -185,7 +185,7 @@ Here's a video on the Euclidean algorithm: {% sample lang="js" %} [import, lang="javascript"](code/javascript/euclidean_example.js) {% sample lang="lisp" %} -[import, lang="lisp"](code/clisp/euclidean_algorithm.lisp) +[import, lang="lisp"](code/clisp/euclidean.lisp) {% sample lang="py" %} [import, lang="python"](code/python/euclidean_example.py) {% sample lang="haskell" %} From 6612af5cfb92a004bbfd884d491fa3dc963d0284 Mon Sep 17 00:00:00 2001 From: Trashtalk Date: Mon, 10 Jun 2019 16:49:06 +0200 Subject: [PATCH 07/13] Revert "Fixed the namechange to work" This reverts commit 44e5523e8cf20955f412d920c2c0a32eddbc20f2. --- .../code/clisp/euclidean.lisp | 31 +++++++++++++++++++ .../euclidean_algorithm.md | 6 ++-- 2 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 contents/euclidean_algorithm/code/clisp/euclidean.lisp diff --git a/contents/euclidean_algorithm/code/clisp/euclidean.lisp b/contents/euclidean_algorithm/code/clisp/euclidean.lisp new file mode 100644 index 000000000..b8d1ef399 --- /dev/null +++ b/contents/euclidean_algorithm/code/clisp/euclidean.lisp @@ -0,0 +1,31 @@ +;;;; Euclid algorithm implementation in Common Lisp + +(defun euclid-sub (a b) + "Finds the greatest common divsor for any two integers" + (euclid-sub* (abs a) (abs b))) + +(defun euclid-sub* (a b) + "Finds the greatest common divisor for any two positive integers" + (if (eq a b) + a + (if (> a b) + (euclid-sub* (- a b) b) + (euclid-sub* a (- b a))))) + +(defun euclid-mod (a b) + "Finds the greatest common divisor for any two integers" + (if (zerop b) + (abs a) + (euclid-mod b (mod a b)))) + +(print (euclid-sub (* 64 67) (* 64 81))) +(print (euclid-mod (* 128 12) (* 128 77))) + +; quick test +(assert + (= (euclid-sub (* 64 67) (* 64 81)) + (gcd (* 64 67) (* 64 81)))) + +(assert + (= (euclid-mod (* 64 67) (* 64 81)) + (gcd (* 64 67) (* 64 81)))) diff --git a/contents/euclidean_algorithm/euclidean_algorithm.md b/contents/euclidean_algorithm/euclidean_algorithm.md index c64906c9a..c2dc106ba 100644 --- a/contents/euclidean_algorithm/euclidean_algorithm.md +++ b/contents/euclidean_algorithm/euclidean_algorithm.md @@ -20,7 +20,7 @@ The algorithm is a simple way to find the *greatest common divisor* (GCD) of two {% sample lang="js" %} [import:15-29, lang="javascript"](code/javascript/euclidean_example.js) {% sample lang="lisp" %} -[import:3-13, lang="lisp"](code/clisp/euclidean.lisp) +[import:3-13, lang="lisp"](code/clisp/euclidean_algorithm.lisp) {% sample lang="py" %} [import:11-22, lang="python"](code/python/euclidean_example.py) {% sample lang="haskell" %} @@ -97,7 +97,7 @@ Modern implementations, though, often use the modulus operator (%) like so {% sample lang="js" %} [import:1-13, lang="javascript"](code/javascript/euclidean_example.js) {% sample lang="lisp" %} -[import:15-19, lang="lisp"](code/clisp/euclidean.lisp) +[import:15-19, lang="lisp"](code/clisp/euclidean_algorithm.lisp) {% sample lang="py" %} [import:1-9, lang="python"](code/python/euclidean_example.py) {% sample lang="haskell" %} @@ -185,7 +185,7 @@ Here's a video on the Euclidean algorithm: {% sample lang="js" %} [import, lang="javascript"](code/javascript/euclidean_example.js) {% sample lang="lisp" %} -[import, lang="lisp"](code/clisp/euclidean.lisp) +[import, lang="lisp"](code/clisp/euclidean_algorithm.lisp) {% sample lang="py" %} [import, lang="python"](code/python/euclidean_example.py) {% sample lang="haskell" %} From 7ed7602524ad195f27913b4d8a6bf819c98f9410 Mon Sep 17 00:00:00 2001 From: Trashtalk Date: Mon, 10 Jun 2019 16:50:33 +0200 Subject: [PATCH 08/13] Fixed the namechange to work again --- contents/euclidean_algorithm/euclidean_algorithm.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contents/euclidean_algorithm/euclidean_algorithm.md b/contents/euclidean_algorithm/euclidean_algorithm.md index c2dc106ba..c64906c9a 100644 --- a/contents/euclidean_algorithm/euclidean_algorithm.md +++ b/contents/euclidean_algorithm/euclidean_algorithm.md @@ -20,7 +20,7 @@ The algorithm is a simple way to find the *greatest common divisor* (GCD) of two {% sample lang="js" %} [import:15-29, lang="javascript"](code/javascript/euclidean_example.js) {% sample lang="lisp" %} -[import:3-13, lang="lisp"](code/clisp/euclidean_algorithm.lisp) +[import:3-13, lang="lisp"](code/clisp/euclidean.lisp) {% sample lang="py" %} [import:11-22, lang="python"](code/python/euclidean_example.py) {% sample lang="haskell" %} @@ -97,7 +97,7 @@ Modern implementations, though, often use the modulus operator (%) like so {% sample lang="js" %} [import:1-13, lang="javascript"](code/javascript/euclidean_example.js) {% sample lang="lisp" %} -[import:15-19, lang="lisp"](code/clisp/euclidean_algorithm.lisp) +[import:15-19, lang="lisp"](code/clisp/euclidean.lisp) {% sample lang="py" %} [import:1-9, lang="python"](code/python/euclidean_example.py) {% sample lang="haskell" %} @@ -185,7 +185,7 @@ Here's a video on the Euclidean algorithm: {% sample lang="js" %} [import, lang="javascript"](code/javascript/euclidean_example.js) {% sample lang="lisp" %} -[import, lang="lisp"](code/clisp/euclidean_algorithm.lisp) +[import, lang="lisp"](code/clisp/euclidean.lisp) {% sample lang="py" %} [import, lang="python"](code/python/euclidean_example.py) {% sample lang="haskell" %} From 58efad63461a6ea7af2c9458071e68898bb79b1c Mon Sep 17 00:00:00 2001 From: Trashtalk Date: Wed, 17 Jul 2019 17:10:43 +0200 Subject: [PATCH 09/13] Changed indentations --- .../euclidean_algorithm/code/clisp/euclidean.lisp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/contents/euclidean_algorithm/code/clisp/euclidean.lisp b/contents/euclidean_algorithm/code/clisp/euclidean.lisp index b8d1ef399..108029454 100644 --- a/contents/euclidean_algorithm/code/clisp/euclidean.lisp +++ b/contents/euclidean_algorithm/code/clisp/euclidean.lisp @@ -9,8 +9,8 @@ (if (eq a b) a (if (> a b) - (euclid-sub* (- a b) b) - (euclid-sub* a (- b a))))) + (euclid-sub* (- a b) b) + (euclid-sub* a (- b a))))) (defun euclid-mod (a b) "Finds the greatest common divisor for any two integers" @@ -21,11 +21,11 @@ (print (euclid-sub (* 64 67) (* 64 81))) (print (euclid-mod (* 128 12) (* 128 77))) -; quick test +;; Quick test (assert - (= (euclid-sub (* 64 67) (* 64 81)) - (gcd (* 64 67) (* 64 81)))) + (eql (euclid-sub (* 64 67) (* 64 81)) + (gcd (* 64 67) (* 64 81)))) (assert - (= (euclid-mod (* 64 67) (* 64 81)) + (eql (euclid-mod (* 64 67) (* 64 81)) (gcd (* 64 67) (* 64 81)))) From ca7c64823e6d75bae7342795a53baef029928d80 Mon Sep 17 00:00:00 2001 From: Trashtalk Date: Wed, 17 Jul 2019 17:12:32 +0200 Subject: [PATCH 10/13] changed a comment --- contents/euclidean_algorithm/code/clisp/euclidean.lisp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contents/euclidean_algorithm/code/clisp/euclidean.lisp b/contents/euclidean_algorithm/code/clisp/euclidean.lisp index 108029454..b06afbf0e 100644 --- a/contents/euclidean_algorithm/code/clisp/euclidean.lisp +++ b/contents/euclidean_algorithm/code/clisp/euclidean.lisp @@ -1,4 +1,4 @@ -;;;; Euclid algorithm implementation in Common Lisp +;;;; Euclidean algorithm implementation in Common Lisp (defun euclid-sub (a b) "Finds the greatest common divsor for any two integers" From db0030402847e3332d7204239602cff124e7458e Mon Sep 17 00:00:00 2001 From: Trashtalk Date: Wed, 17 Jul 2019 17:26:52 +0200 Subject: [PATCH 11/13] Added newline at the end --- contents/euclidean_algorithm/code/clisp/euclidean.lisp | 1 + 1 file changed, 1 insertion(+) diff --git a/contents/euclidean_algorithm/code/clisp/euclidean.lisp b/contents/euclidean_algorithm/code/clisp/euclidean.lisp index b06afbf0e..cdbfe0d9e 100644 --- a/contents/euclidean_algorithm/code/clisp/euclidean.lisp +++ b/contents/euclidean_algorithm/code/clisp/euclidean.lisp @@ -29,3 +29,4 @@ (assert (eql (euclid-mod (* 64 67) (* 64 81)) (gcd (* 64 67) (* 64 81)))) + From e1953bba1b1321718fe722ad9497001b18c4e718 Mon Sep 17 00:00:00 2001 From: Trashtalk Date: Sun, 8 Sep 2019 19:42:57 +0200 Subject: [PATCH 12/13] changed the euclid-sub function and fixed issues --- .../code/clisp/euclidean.lisp | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/contents/euclidean_algorithm/code/clisp/euclidean.lisp b/contents/euclidean_algorithm/code/clisp/euclidean.lisp index cdbfe0d9e..3cb0b786a 100644 --- a/contents/euclidean_algorithm/code/clisp/euclidean.lisp +++ b/contents/euclidean_algorithm/code/clisp/euclidean.lisp @@ -2,16 +2,15 @@ (defun euclid-sub (a b) "Finds the greatest common divsor for any two integers" + (defun euclid-sub* (a b) + "Finds the greatest common divisor for any two positive integers" + (if (eql a b) + a + (if (> a b) + (euclid-sub* (- a b) b) + (euclid-sub* a (- b a))))) (euclid-sub* (abs a) (abs b))) -(defun euclid-sub* (a b) - "Finds the greatest common divisor for any two positive integers" - (if (eq a b) - a - (if (> a b) - (euclid-sub* (- a b) b) - (euclid-sub* a (- b a))))) - (defun euclid-mod (a b) "Finds the greatest common divisor for any two integers" (if (zerop b) @@ -23,10 +22,9 @@ ;; Quick test (assert - (eql (euclid-sub (* 64 67) (* 64 81)) + (eql (euclid-sub (* 64 67) (* 64 81)) (gcd (* 64 67) (* 64 81)))) (assert - (eql (euclid-mod (* 64 67) (* 64 81)) - (gcd (* 64 67) (* 64 81)))) - + (eql (euclid-mod (* 64 67) (* 64 81)) + (gcd (* 64 67) (* 64 81)))) From a4cb76c08165e1423edf3ff7774d95f231e2254e Mon Sep 17 00:00:00 2001 From: Trashtalk Date: Sun, 8 Sep 2019 19:49:48 +0200 Subject: [PATCH 13/13] fixed indentation, and changed .md file --- contents/euclidean_algorithm/code/clisp/euclidean.lisp | 2 +- contents/euclidean_algorithm/euclidean_algorithm.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/contents/euclidean_algorithm/code/clisp/euclidean.lisp b/contents/euclidean_algorithm/code/clisp/euclidean.lisp index 3cb0b786a..62f525ac3 100644 --- a/contents/euclidean_algorithm/code/clisp/euclidean.lisp +++ b/contents/euclidean_algorithm/code/clisp/euclidean.lisp @@ -8,7 +8,7 @@ a (if (> a b) (euclid-sub* (- a b) b) - (euclid-sub* a (- b a))))) + (euclid-sub* a (- b a))))) (euclid-sub* (abs a) (abs b))) (defun euclid-mod (a b) diff --git a/contents/euclidean_algorithm/euclidean_algorithm.md b/contents/euclidean_algorithm/euclidean_algorithm.md index c64906c9a..90eab85e2 100644 --- a/contents/euclidean_algorithm/euclidean_algorithm.md +++ b/contents/euclidean_algorithm/euclidean_algorithm.md @@ -20,7 +20,7 @@ The algorithm is a simple way to find the *greatest common divisor* (GCD) of two {% sample lang="js" %} [import:15-29, lang="javascript"](code/javascript/euclidean_example.js) {% sample lang="lisp" %} -[import:3-13, lang="lisp"](code/clisp/euclidean.lisp) +[import:3-12, lang="lisp"](code/clisp/euclidean.lisp) {% sample lang="py" %} [import:11-22, lang="python"](code/python/euclidean_example.py) {% sample lang="haskell" %} @@ -97,7 +97,7 @@ Modern implementations, though, often use the modulus operator (%) like so {% sample lang="js" %} [import:1-13, lang="javascript"](code/javascript/euclidean_example.js) {% sample lang="lisp" %} -[import:15-19, lang="lisp"](code/clisp/euclidean.lisp) +[import:14-18, lang="lisp"](code/clisp/euclidean.lisp) {% sample lang="py" %} [import:1-9, lang="python"](code/python/euclidean_example.py) {% sample lang="haskell" %}