The I's are done.

This commit is contained in:
Simon Forman 2022-03-25 17:41:31 -07:00
parent 7403b1a07e
commit b59c7a303d
8 changed files with 528 additions and 712 deletions

View File

@ -5,7 +5,7 @@
Function Function
x y hypot x y hypot
-------------------------- ---------------------------
sqrt(sqr(x) + sqr(y)) sqrt(sqr(x) + sqr(y))
### Definition ### Definition

View File

@ -2,28 +2,10 @@
## id ## id
Basis Function Combinator Basis Function
The identity function. The identity function.
Gentzen diagram.
### Definition
if not basis.
### Derivation
if not basis.
### Source
if basis
### Discussion ### Discussion
Lorem ipsum. Does nothing. It's kind of a mathematical thing, but it occasionally comes in handy.
### Crosslinks
Lorem ipsum.

View File

@ -2,42 +2,20 @@
## ifte ## ifte
Basis Function Combinator Combinator
If-Then-Else Combinator : If-Then-Else combinator, a common and convenient specialization of [branch].
... [if] [then] [else] ifte [if] [then] [else] ifte
--------------------------------------------------- ---------------------------------------
... [[else] [then]] [...] [if] infra select i [if] nullary [else] [then] branch
... [if] [then] [else] ifte
-------------------------------------------------------
... [else] [then] [...] [if] infra first choice i
Has the effect of grabbing a copy of the stack on which to run the
if-part using infra.
Gentzen diagram.
### Definition ### Definition
if not basis. > \[[nullary]\] [dipd] [swap] [branch]
### Derivation
if not basis.
### Source
if basis
### Discussion
Lorem ipsum.
### Crosslinks ### Crosslinks
Lorem ipsum. [branch]
[loop]
[while]

View File

@ -2,19 +2,18 @@
## infra ## infra
(Combinator) Combinator
Accept a quoted program and a list on the stack and run the program with Accept a quoted program and a list on the stack and run the program with
the list as its stack. Does not affect the stack (below the list.) the list as its stack. Does not affect the stack (below the list.)
... [a b c] [Q] infra ... x y z [a b c] [Q] infra
--------------------------- ---------------------------------
c b a Q [...] swaack c b a Q [z y x ...] swaack
### Definition ### Definition
swons swaack [i] dip swaack > [swons] [swaack] \[[i]\] [dip] [swaack]
### Discussion ### Discussion

View File

@ -2,28 +2,11 @@
## infrst ## infrst
Basis Function Combinator Combinator
infra first Does [infra] and then extracts the [first] item from the resulting list.
Gentzen diagram.
### Definition ### Definition
if not basis. > [infra] [first]
### Derivation
if not basis.
### Source
if basis
### Discussion
Lorem ipsum.
### Crosslinks
Lorem ipsum.

View File

@ -2,32 +2,17 @@
## inscribe ## inscribe
Basis Function Combinator
Create a new Joy function definition in the Joy dictionary. A definition Create a new Joy function definition in the Joy dictionary. A definition
is given as a quote with a name followed by a Joy expression. for is given as a quote with a name followed by a Joy expression.
example:
> \[sqr dup mul\] inscribe ### Example
Gentzen diagram. [sqr dup mul] inscribe
### Definition
if not basis.
### Derivation
if not basis.
### Source
if basis
### Discussion ### Discussion
Lorem ipsum. This is the only function that modifies the dictionary. It's provided as a
convenience, for tinkering with new definitions before entering them into
the `defs.txt` file. It can be abused, which you should avoid unless you
know what you're doing.
### Crosslinks
Lorem ipsum.

File diff suppressed because it is too large Load Diff

View File

@ -1842,7 +1842,7 @@ item on the top of the stack is a quoted symbol.
Function Function
x y hypot x y hypot
-------------------------- ---------------------------
sqrt(sqr(x) + sqr(y)) sqrt(sqr(x) + sqr(y))
### Definition ### Definition
@ -1881,75 +1881,35 @@ example, the [x] combinator can be defined as `dup i`.
## id ## id
Basis Function Combinator Basis Function
The identity function. The identity function.
Gentzen diagram.
### Definition
if not basis.
### Derivation
if not basis.
### Source
if basis
### Discussion ### Discussion
Lorem ipsum. Does nothing. It's kind of a mathematical thing, but it occasionally comes in handy.
### Crosslinks
Lorem ipsum.
------------------------------------------------------------------------ ------------------------------------------------------------------------
## ifte ## ifte
Basis Function Combinator Combinator
If-Then-Else Combinator : If-Then-Else combinator, a common and convenient specialization of [branch].
... [if] [then] [else] ifte [if] [then] [else] ifte
--------------------------------------------------- ---------------------------------------
... [[else] [then]] [...] [if] infra select i [if] nullary [else] [then] branch
... [if] [then] [else] ifte
-------------------------------------------------------
... [else] [then] [...] [if] infra first choice i
Has the effect of grabbing a copy of the stack on which to run the
if-part using infra.
Gentzen diagram.
### Definition ### Definition
if not basis. > \[[nullary]\] [dipd] [swap] [branch]
### Derivation
if not basis.
### Source
if basis
### Discussion
Lorem ipsum.
### Crosslinks ### Crosslinks
Lorem ipsum. [branch]
[loop]
[while]
------------------------------------------------------------------------ ------------------------------------------------------------------------
@ -2003,19 +1963,18 @@ In some cases (like the example above) this is the same effect as using [app2] b
## infra ## infra
(Combinator) Combinator
Accept a quoted program and a list on the stack and run the program with Accept a quoted program and a list on the stack and run the program with
the list as its stack. Does not affect the stack (below the list.) the list as its stack. Does not affect the stack (below the list.)
... [a b c] [Q] infra ... x y z [a b c] [Q] infra
--------------------------- ---------------------------------
c b a Q [...] swaack c b a Q [z y x ...] swaack
### Definition ### Definition
swons swaack [i] dip swaack > [swons] [swaack] \[[i]\] [dip] [swaack]
### Discussion ### Discussion
@ -2033,65 +1992,33 @@ kind of "pocket universe". If the list represents a datastructure then
## infrst ## infrst
Basis Function Combinator Combinator
infra first Does [infra] and then extracts the [first] item from the resulting list.
Gentzen diagram.
### Definition ### Definition
if not basis. > [infra] [first]
### Derivation
if not basis.
### Source
if basis
### Discussion
Lorem ipsum.
### Crosslinks
Lorem ipsum.
------------------------------------------------------------------------ ------------------------------------------------------------------------
## inscribe ## inscribe
Basis Function Combinator
Create a new Joy function definition in the Joy dictionary. A definition Create a new Joy function definition in the Joy dictionary. A definition
is given as a quote with a name followed by a Joy expression. for is given as a quote with a name followed by a Joy expression.
example:
> \[sqr dup mul\] inscribe ### Example
Gentzen diagram. [sqr dup mul] inscribe
### Definition
if not basis.
### Derivation
if not basis.
### Source
if basis
### Discussion ### Discussion
Lorem ipsum. This is the only function that modifies the dictionary. It's provided as a
convenience, for tinkering with new definitions before entering them into
the `defs.txt` file. It can be abused, which you should avoid unless you
know what you're doing.
### Crosslinks
Lorem ipsum.
------------------------------------------------------------------------ ------------------------------------------------------------------------