all repos — hex @ 9aaf68938099f27f8831d4672eb61bfbef96fd75

A tiny, minimalist, slightly-esoteric concatenative programming lannguage.

Fixes.
h3rald h3rald@h3rald.com
Tue, 17 Dec 2024 18:28:46 +0000
commit

9aaf68938099f27f8831d4672eb61bfbef96fd75

parent

bb80f31447c5d10ec933979d3aa7d3f558f13f89

1 files changed, 2 insertions(+), 2 deletions(-)

jump to
M web/contents/learn.htmlweb/contents/learn.html

@@ -160,13 +160,13 @@ <p>Say you want to print the size of each file in the current directory, for example.</p>

<p>Let's start with creating our own symbol to read the contents of the current directory and put them in a quotation:</p> - <pre><code>($"ls"$$ $:run$$ $0x1$$ $:get$$ $"\n"$$ $:split$$) $"ls"$$ $::$$</code></pre> + <pre><code>($"ls"$$ $:run$$ $0x1$$ $:get$$ $"&bsol;n"$$ $:split$$) $"ls"$$ $::$$</code></pre> <p>Basically, when dequoted, this quotation will:</p> <ol> <li>Run the <code>ls</code> command (it will work on *nix at least) using the {{run}} symbol.</li> <li>Get the content of the standard output of the command result via {{get}}.</li> <li>Now you have a single string with all the directory contents, so you want to just split it by - $"\n"$$ to get the file names in a quotation.</li> + $"&bsol;n"$$ to get the file names in a quotation.</li> </ol> <p>Let's try it in the REPL:</p> <pre><code>$:ls$$ $:.$$</code></pre>