Minor fixes + Copy editing
Yanis Zafirópulos 1265028+drkameleon@users.noreply.github.com
Mon, 02 Nov 2020 10:59:37 +0100
1 files changed,
4 insertions(+),
4 deletions(-)
jump to
M
site/contents/learn.md
→
site/contents/learn.md
@@ -19,17 +19,17 @@ (1 4 9 16 25)
Let's see how it works: -1. First a list containing the first five integer is pushed on the stack. -2. Then, another list containing two symbols (`dup` and `*`) is pushed on the stack. This constitutes a quoted program which, when executed duplicates the first element on the stack —this is done by `dup`— and then multiplies —with `*`— the two elements together. +1. First, a list containing the first five integers is pushed on the stack. +2. Then, another list containing two symbols (`dup` and `*`) is pushed on the stack. This constitutes a quoted program which, when executed duplicates the first element on the stack — this is done by `dup`— and then multiplies — with `*`— the two elements together. 3. Finally, the symbol `map` is pushed on the stack. Map takes a list of elements and a quoted program and applies the program to each element. Note that: * There are no variable assignments. * elements are pushed on the stack one by one. -* Parentheses are used to group together one or more elements, so that they are treated as a single element and they are not evaluated immediately. +* Parentheses are used to group one or more elements together so that they are treated as a single element and they are not evaluated immediately. * *Symbols* (typically single words, or several words joined by dashes) are used to execute code that performs operations on the whole stack. -Unlike more traditional programming languages, in a concatenative programming language there is no inherent need of variables or named parameters, as symbols acts as stack operators that consume elements that are placed in order on top of a stack. +Unlike more traditional programming languages, in a concatenative programming language, there is no inherent need for variables or named parameters, as symbols act as stack operators that consume elements that are placed in order on top of a stack. {#link-learn||data-types||Data Types#}