Fixes.
h3rald h3rald@h3rald.com
Tue, 17 Dec 2024 18:28:46 +0000
1 files changed,
2 insertions(+),
2 deletions(-)
jump to
M
web/contents/learn.html
→
web/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$$ $"\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> + $"\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>