all repos — min @ 520c614c5543e45d78af0bf7efd58b9ff1625e01

A small but practical concatenative programming language.

fixed a typo
cHItiVer 114033341+cHItiVer@users.noreply.github.com
Sun, 15 Jan 2023 00:18:53 -0500
commit

520c614c5543e45d78af0bf7efd58b9ff1625e01

parent

499621ee59f09d4d57fcf5b20e3fa3b8af411427

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

jump to
M site/contents/learn-quotations.mdsite/contents/learn-quotations.md

@@ -21,7 +21,7 @@ 1. The `.` symbol is pushed on the stack, and it is immediately evaluated to the full path to the current directory.

2. The `ls` symbol is pushed on the stack, it consumes the string already on the stack and returns a quotation containing all files and directories within the current directory. 3. The quotation `(ftype 'file ==)` is pushed on the stack. It is treated exactly like a list of data and it is not evaluated. 4. The `filter` symbol is pushed on the stack. This symbol takes two quotations as input, and applies the result of the first quotation on the stack (`(ftype "file" ==)`) to all elements of the second quotation of the stack (the list of files and directories), returning a new quotation containing only those elements of the second quotation on the stack that satisfy the result of the first quotation. In this case, it returns a new quotation containing only files. -5. `'>` is pushed on the stack. The `'` sigil can be used instead of the `quote` symbol to quote a single symbol, `<` in this case. In other words, it is instantly evaluated to the quotation `(>)`. +5. `'>` is pushed on the stack. The `'` sigil can be used instead of the `quote` symbol to quote a single symbol, `>` in this case. In other words, it is instantly evaluated to the quotation `(>)`. 6. The symbol `sort` is pushed on the stack. This symbol, like `filter`, takes two quotations as input, and applies the first quotation to each element of the second quotation, effectively sorting each element of the second quotation using the predicate expressed by the first quotation. In this case, all files are sorted by name in ascending order. > %tip%