aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--docs/code.css4
-rw-r--r--docs/code.js2
-rw-r--r--docs/wiki_src/coding/recursion.md12
3 files changed, 10 insertions, 8 deletions
diff --git a/docs/code.css b/docs/code.css
index 76fb483..d96484b 100644
--- a/docs/code.css
+++ b/docs/code.css
@@ -1,3 +1,7 @@
+code, pre {
+ tab-size: 4;
+}
+
.com {
color: #ff64bd;
}
diff --git a/docs/code.js b/docs/code.js
index 8440591..3a2a7bd 100644
--- a/docs/code.js
+++ b/docs/code.js
@@ -43,7 +43,7 @@ const highlight = (elem) => {
(_, t) => `<span class='com'>:time</span> ${term(t)}`,
)
.replaceAll(
- /^([^:\n<#][^ ]*) (.*)$/gm,
+ /^([ \t]*[^:\n<#][^ ]*) (.*)$/gm,
(_, d, t) => `<span class='def'>${d}</span> ${term(t)}`,
)
.replaceAll(/^# (.*)$/gm, "<span class='comment'># $1</span>")
diff --git a/docs/wiki_src/coding/recursion.md b/docs/wiki_src/coding/recursion.md
index 9625ef9..5a3ab85 100644
--- a/docs/wiki_src/coding/recursion.md
+++ b/docs/wiki_src/coding/recursion.md
@@ -14,13 +14,11 @@ recursion.
Say we want a function `g`{.bruijn} to be able to call itself. With the
`y`{.bruijn} combinator the following equivalence is obtained:
-``` bruijn
- (y g)
-⤳ [[1 (0 0)] [1 (0 0)]] g
-⤳ [g (0 0)] [g (0 0)]
-⤳ g ([g (0 0)] [g (0 0)])
-≡ g (y g)
-```
+ (y g)
+ ⤳ [[1 (0 0)] [1 (0 0)]] g
+ ⤳ [g (0 0)] [g (0 0)]
+ ⤳ g ([g (0 0)] [g (0 0)])
+ ≡ g (y g)
With this equivalence, `g`{.bruijn} is able to call itself since its
outer argument is the initial function again.