This commit is contained in:
Simon Forman 2022-03-27 10:52:17 -07:00
parent 7863ba8856
commit c39d6123a9
8 changed files with 494 additions and 581 deletions

View File

@ -2,28 +2,36 @@
## make_generator ## make_generator
Basis Function Combinator Function
\[codireco\] ccons Given an initial state value and a quoted generator function build a
generator quote.
Gentzen diagram. state [generator function] make_generator
-----------------------------------------------
[state [generator function] codireco]
### Example
230 [dup ++] make_generator
---------------------------------
[230 [dup ++] codireco]
And then:
[230 [dup ++] codireco] 5 [x] times pop
---------------------------------------------
230 231 232 233 234
### Definition ### Definition
if not basis. > \[[codireco]\] [ccons]
### Derivation
if not basis.
### Source
if basis
### Discussion ### Discussion
Lorem ipsum. See the ["Using `x` to Generate Values" notebook](https://joypy.osdn.io/notebooks/Generator_Programs.html#an-interesting-variation).
### Crosslinks ### Crosslinks
Lorem ipsum. [codireco]

View File

@ -2,29 +2,28 @@
## map ## map
Basis Function Combinator Combinator
Run the quoted program on TOS on the items in the list under it, push a Given a list of items and a quoted program run the program for each item
new list with the results in place of the program and original list. in the list (with the rest of the stack) and replace the old list and the
program with a list of the results.
Gentzen diagram. ### Example
### Definition 5 [1 2 3] [++ *] map
--------------------------
if not basis. 5 [10 15 20]
### Derivation
if not basis.
### Source
if basis
### Discussion ### Discussion
Lorem ipsum. This is a common operation in many languages. In Joy it can be a
parallelism combinator due to the "pure" nature of the language.
### Crosslinks ### Crosslinks
Lorem ipsum. [app1]
[app2]
[app3]
[appN](#appn)
[fork]

View File

@ -2,28 +2,19 @@
## max ## max
Basis Function Combinator Basis Function
Given a list find the maximum. Given a list find the maximum.
Gentzen diagram. ### Example
### Definition [1 2 3 4] max
-------------------
if not basis. 4
### Derivation
if not basis.
### Source
if basis
### Discussion
Lorem ipsum.
### Crosslinks ### Crosslinks
Lorem ipsum. [min]
[size]
[sum]

View File

@ -2,28 +2,19 @@
## min ## min
Basis Function Combinator Basis Function
Given a list find the minimum. Given a list find the minimum.
Gentzen diagram. ### Example
### Definition [1 2 3 4] min
-------------------
if not basis. 1
### Derivation
if not basis.
### Source
if basis
### Discussion
Lorem ipsum.
### Crosslinks ### Crosslinks
Lorem ipsum. [max]
[size]
[sum]

File diff suppressed because it is too large Load Diff

View File

@ -2122,152 +2122,129 @@ stack, replacing them with a Boolean value.
## make_generator ## make_generator
Basis Function Combinator Function
\[codireco\] ccons Given an initial state value and a quoted generator function build a
generator quote.
Gentzen diagram. state [generator function] make_generator
-----------------------------------------------
[state [generator function] codireco]
### Example
230 [dup ++] make_generator
---------------------------------
[230 [dup ++] codireco]
And then:
[230 [dup ++] codireco] 5 [x] times pop
---------------------------------------------
230 231 232 233 234
### Definition ### Definition
if not basis. > \[[codireco]\] [ccons]
### Derivation
if not basis.
### Source
if basis
### Discussion ### Discussion
Lorem ipsum. See the ["Using `x` to Generate Values" notebook](https://joypy.osdn.io/notebooks/Generator_Programs.html#an-interesting-variation).
### Crosslinks ### Crosslinks
Lorem ipsum. [codireco]
------------------------------------------------------------------------ ------------------------------------------------------------------------
## map ## map
Basis Function Combinator Combinator
Run the quoted program on TOS on the items in the list under it, push a Given a list of items and a quoted program run the program for each item
new list with the results in place of the program and original list. in the list (with the rest of the stack) and replace the old list and the
program with a list of the results.
Gentzen diagram. ### Example
### Definition 5 [1 2 3] [++ *] map
--------------------------
if not basis. 5 [10 15 20]
### Derivation
if not basis.
### Source
if basis
### Discussion ### Discussion
Lorem ipsum. This is a common operation in many languages. In Joy it can be a
parallelism combinator due to the "pure" nature of the language.
### Crosslinks ### Crosslinks
Lorem ipsum. [app1]
[app2]
[app3]
[appN](#appn)
[fork]
------------------------------------------------------------------------ ------------------------------------------------------------------------
## max ## max
Basis Function Combinator Basis Function
Given a list find the maximum. Given a list find the maximum.
Gentzen diagram. ### Example
### Definition [1 2 3 4] max
-------------------
if not basis. 4
### Derivation
if not basis.
### Source
if basis
### Discussion
Lorem ipsum.
### Crosslinks ### Crosslinks
Lorem ipsum. [min]
[size]
[sum]
------------------------------------------------------------------------ ------------------------------------------------------------------------
## min ## min
Basis Function Combinator Basis Function
Given a list find the minimum. Given a list find the minimum.
Gentzen diagram. ### Example
### Definition [1 2 3 4] min
-------------------
if not basis. 1
### Derivation
if not basis.
### Source
if basis
### Discussion
Lorem ipsum.
### Crosslinks ### Crosslinks
Lorem ipsum. [max]
[size]
[sum]
------------------------------------------------------------------------ ------------------------------------------------------------------------
## mod ## mod
Basis Function Combinator Basis Function
Same as a % b. Return the remainder of `a` divided by `b`.
Gentzen diagram. a b mod
-------------
### Definition (a%b)
if not basis.
### Derivation
if not basis.
### Source
if basis
### Discussion
Lorem ipsum.
### Crosslinks ### Crosslinks
Lorem ipsum. [divmod]
[mul]
-------------- --------------
@ -2280,31 +2257,19 @@ See [mod](#mod).
## mul ## mul
Basis Function Combinator Basis Function
Same as a \* b. Multiply two numbers.
Gentzen diagram. a b mul
-------------
### Definition (a×b)
if not basis.
### Derivation
if not basis.
### Source
if basis
### Discussion
Lorem ipsum.
### Crosslinks ### Crosslinks
Lorem ipsum. [div]
[product]
------------------------------------------------------------------------ ------------------------------------------------------------------------

View File

@ -2,28 +2,16 @@
## mod ## mod
Basis Function Combinator Basis Function
Same as a % b. Return the remainder of `a` divided by `b`.
Gentzen diagram. a b mod
-------------
### Definition (a%b)
if not basis.
### Derivation
if not basis.
### Source
if basis
### Discussion
Lorem ipsum.
### Crosslinks ### Crosslinks
Lorem ipsum. [divmod]
[mul]

View File

@ -2,28 +2,16 @@
## mul ## mul
Basis Function Combinator Basis Function
Same as a \* b. Multiply two numbers.
Gentzen diagram. a b mul
-------------
### Definition (a×b)
if not basis.
### Derivation
if not basis.
### Source
if basis
### Discussion
Lorem ipsum.
### Crosslinks ### Crosslinks
Lorem ipsum. [div]
[product]