From a722f900728f4382c28210ada977c7f7b56901be Mon Sep 17 00:00:00 2001 From: Simon Forman Date: Tue, 29 Mar 2022 12:57:41 -0700 Subject: [PATCH] T's and U's. --- docs/reference/mkref/FuncRef.html | 310 ++++++++++------------ docs/reference/mkref/Functor-Reference.md | 291 +++++++------------- docs/reference/tailrec.md | 26 +- docs/reference/take.md | 30 +-- docs/reference/ternary.md | 9 +- docs/reference/third.md | 28 +- docs/reference/times.md | 51 ++-- docs/reference/tuck.md | 26 +- docs/reference/unary.md | 7 +- docs/reference/uncons.md | 14 +- docs/reference/unique.md | 23 +- docs/reference/unit.md | 25 +- docs/reference/unquoted.md | 27 +- docs/reference/unswons.md | 25 +- implementations/defs.txt | 2 +- 15 files changed, 335 insertions(+), 559 deletions(-) diff --git a/docs/reference/mkref/FuncRef.html b/docs/reference/mkref/FuncRef.html index 7a4565d..879fc2e 100644 --- a/docs/reference/mkref/FuncRef.html +++ b/docs/reference/mkref/FuncRef.html @@ -2276,256 +2276,226 @@ a F a

tailrec

-

Basis Function Combinator

-

[i] genrec

-

Gentzen diagram.

+

Combinator

+

A specialization of the genrec combinator.

Definition

-

if not basis.

-

Derivation

-

if not basis.

-

Source

-

if basis

+
+

[i] genrec

+

Discussion

-

Lorem ipsum.

+

Some recursive functions do not need to store additional data or pending actions per-call. These are called “tail recursive” functions. In Joy, they appear as genrec definitions that have i for the second half of their recursive branch.

+

See the Recursion Combinators notebook.

-

Lorem ipsum.

+

genrec


take

-

Basis Function Combinator

-

Expects an integer and a quote on the stack and returns the quote with just the top n items in reverse order (because that's easier and you can use reverse if needed.) :

-
[a b c d] 2 take
+

Function

+

Expects an integer n and a list on the stack and replace them with a list with just the top n items in reverse order.

+
   [a b c d] 2 take
 ----------------------
-    [b a]
-

Gentzen diagram.

+ [b a]

Definition

-

if not basis.

-

Derivation

-

if not basis.

-

Source

-

if basis

-

Discussion

-

Lorem ipsum.

- -

Lorem ipsum.

+
+

<<{} [shift] times pop

+

ternary

-

(Combinator)

+

Combinator

Run a quoted program using exactly three stack values and leave the first item of the result on the stack.

-
   ... z y x [P] unary
+
   ... z y x [P] ternary
 -------------------------
-         ... A
+ ... a

Definition

-
binary popd
-

Discussion

+
+

binary popd

+
+

Discussion

Runs any other quoted function and returns its first result while consuming exactly three items from the stack.

- +

binary nullary unary


third

-

Basis Function Combinator

-
([a1 a2 a3 ...1] -- a3)
-

Gentzen diagram.

+

Function

+
   [a b c ...] third
+-----------------------
+           c

Definition

-

if not basis.

-

Derivation

-

if not basis.

-

Source

-

if basis

-

Discussion

-

Lorem ipsum.

- -

Lorem ipsum.

+
+

rest second

+
+ +

first second fourth rest


times

-

Basis Function Combinator

-

times == [-- dip] cons [swap] infra [0 >] swap while pop :

-
... n [Q] . times
----------------------  w/ n <= 0
-  ... .
+

Combinator

+

Expect a quoted program and an integer n on the stack and do the program n times.

+
   ... n [Q] . times
+-----------------------  w/ n <= 0
+         ... .
 
-
-... 1 [Q] . times
+   ... 1 [Q] . times
 -----------------------
-  ... . Q
+         ... . Q
 
-
-... n [Q] . times
+   ... n [Q] . times
 -------------------------------------  w/ n > 1
-  ... . Q (n - 1) [Q] times
-

Gentzen diagram.

+ ... . Q (n-1) [Q] times

Definition

-

if not basis.

-

Derivation

-

if not basis.

-

Source

-

if basis

-

Discussion

-

Lorem ipsum.

- -

Lorem ipsum.

+
+

[-- dip] cons [swap] infra [0 >] swap while pop :

+
+

Discussion

+

This works by building a little while program and running it:

+
                 1 3 [++] • [-- dip] cons [swap] infra [0 >] swap while pop                                                                                                                 
+        1 3 [++] [-- dip] • cons [swap] infra [0 >] swap while pop                                                                                                                          
+        1 3 [[++] -- dip] • [swap] infra [0 >] swap while pop                                                                                                                               
+ 1 3 [[++] -- dip] [swap] • infra [0 >] swap while pop                                                                                                                                      
+              dip -- [++] • swap [3 1] swaack [0 >] swap while pop                                                                                                                          
+              dip [++] -- • [3 1] swaack [0 >] swap while pop                                                                                                                               
+        dip [++] -- [3 1] • swaack [0 >] swap while pop                                                                                                                                     
+        1 3 [-- [++] dip] • [0 >] swap while pop                                                                                                                                            
+  1 3 [-- [++] dip] [0 >] • swap while pop                                                                                                                                                  
+  1 3 [0 >] [-- [++] dip] • while pop                                                                                                                                                       
+

This is a common pattern in Joy. You accept some parameters from the stack which typically include qouted programs and use them to build another program which does the actual work. This is kind of like macros in Lisp, or preprocessor directives in C.


truthy

See bool.


tuck

-

Basis Function Combinator

-
(a2 a1 -- a1 a2 a1)
-

Gentzen diagram.

+

Function

+

dup the item on the top of the stack under the second item on the stack.

+
   a b tuck
+--------------
+    b a b

Definition

-

if not basis.

-

Derivation

-

if not basis.

-

Source

-

if basis

-

Discussion

-

Lorem ipsum.

- -

Lorem ipsum.

+
+

dup [swap] dip

+
+ +

over


unary

(Combinator)

Run a quoted program using exactly one stack value and leave the first item of the result on the stack.

   ... x [P] unary
 ---------------------
-       ... A
+ ... a

Definition

-
nullary popd
-

Discussion

+
+

nullary popd

+
+

Discussion

Runs any other quoted function and returns its first result while consuming exactly one item from the stack.

- +

binary nullary ternary


uncons

-

(Basis Function)

+

Basis Function

Removes an item from a list and leaves it on the stack under the rest of the list. You cannot uncons an item from an empty list.

-
   [A ...] uncons
+
   [a ...] uncons
 --------------------
-      A [...]
-

Source

-
func(uncons, Si, So) :- func(cons, So, Si).
-

Discussion

-

This is the inverse of cons.

- + a [...]
+

Discussion

+

This is the inverse of cons.

+

cons


unique

-

Basis Function Combinator

+

Function

Given a list remove duplicate items.

-

Gentzen diagram.

-

Definition

-

if not basis.

-

Derivation

-

if not basis.

-

Source

-

if basis

-

Discussion

-

Lorem ipsum.

- -

Lorem ipsum.


unit

-

Basis Function Combinator

-
(a1 -- [a1 ])
-

Gentzen diagram.

-

Definition

-

if not basis.

-

Derivation

-

if not basis.

-

Source

-

if basis

-

Discussion

-

Lorem ipsum.

- -

Lorem ipsum.

+

Function

+
   a unit
+------------
+    [a]
+

Definition

+
+

[] cons

+

unquoted

-

Basis Function Combinator

-

[i] dip

-

Gentzen diagram.

-

Definition

-

if not basis.

-

Derivation

-

if not basis.

-

Source

-

if basis

-

Discussion

-

Lorem ipsum.

- -

Lorem ipsum.

+

Combinator

+

Unquote (using i) the list that is second on the stack.

+

Example

+
   1 2 [3 4] 5 unquoted
+--------------------------
+         1 2 3 4 5
+

Definition

+
+

[i] dip

+
+ +

unit


unswons

-

Basis Function Combinator

-
([a1 ...1] -- [...1] a1)
-

Gentzen diagram.

-

Definition

-

if not basis.

-

Derivation

-

if not basis.

-

Source

-

if basis

-

Discussion

-

Lorem ipsum.

- -

Lorem ipsum.

+

Function

+
   [a ...] unswons
+---------------------
+       [...] a
+

Definition

+
+

uncons swap

+

void

Basis Function Combinator

True if the form on TOS is void otherwise False.

Gentzen diagram.

-

Definition

+

Definition

if not basis.

-

Derivation

+

Derivation

if not basis.

-

Source

+

Source

if basis

-

Discussion

+

Discussion

Lorem ipsum.

- +

Lorem ipsum.


warranty

Basis Function Combinator

Print warranty information.

Gentzen diagram.

-

Definition

+

Definition

if not basis.

-

Derivation

+

Derivation

if not basis.

-

Source

+

Source

if basis

-

Discussion

+

Discussion

Lorem ipsum.

- +

Lorem ipsum.


while

Basis Function Combinator

swap nulco dupdipd concat loop

Gentzen diagram.

-

Definition

+

Definition

if not basis.

-

Derivation

+

Derivation

if not basis.

-

Source

+

Source

if basis

-

Discussion

+

Discussion

Lorem ipsum.

- +

Lorem ipsum.


words

Basis Function Combinator

Print all the words in alphabetical order.

Gentzen diagram.

-

Definition

+

Definition

if not basis.

-

Derivation

+

Derivation

if not basis.

-

Source

+

Source

if basis

-

Discussion

+

Discussion

Lorem ipsum.

- +

Lorem ipsum.


x

@@ -2533,39 +2503,39 @@ a F a
   [F] x
 -----------
    [F] F
-

Definition

+

Definition

dup i
-

Discussion

+

Discussion

The x combinator …


xor

Basis Function Combinator

Same as a ^ b.

Gentzen diagram.

-

Definition

+

Definition

if not basis.

-

Derivation

+

Derivation

if not basis.

-

Source

+

Source

if basis

-

Discussion

+

Discussion

Lorem ipsum.

- +

Lorem ipsum.


zip

Basis Function Combinator

Replace the two lists on the top of the stack with a list of the pairs from each list. The smallest list sets the length of the result list.

Gentzen diagram.

-

Definition

+

Definition

if not basis.

-

Derivation

+

Derivation

if not basis.

-

Source

+

Source

if basis

-

Discussion

+

Discussion

Lorem ipsum.

- +

Lorem ipsum.

diff --git a/docs/reference/mkref/Functor-Reference.md b/docs/reference/mkref/Functor-Reference.md index 270312f..effdeaa 100644 --- a/docs/reference/mkref/Functor-Reference.md +++ b/docs/reference/mkref/Functor-Reference.md @@ -3656,85 +3656,62 @@ Like [cons] but [swap] the item and list. ## tailrec -Basis Function Combinator +Combinator -\[i\] genrec - -Gentzen diagram. +A specialization of the [genrec] combinator. ### Definition -if not basis. - -### Derivation - -if not basis. - -### Source - -if basis +> \[[i]\] [genrec] ### Discussion -Lorem ipsum. +Some recursive functions do not need to store additional data or pending +actions per-call. These are called ["tail recursive" functions](https://en.wikipedia.org/wiki/Tail_recursive). In Joy, +they appear as [genrec] definitions that have [i] for the second half of +their recursive branch. + +See the [Recursion Combinators notebook](https://joypy.osdn.io/notebooks/Recursion_Combinators.html). ### Crosslinks -Lorem ipsum. +[genrec] + ------------------------------------------------------------------------ ## take -Basis Function Combinator +Function -Expects an integer and a quote on the stack and returns the quote with -just the top n items in reverse order (because that\'s easier and you -can use reverse if needed.) : +Expects an integer `n` and a list on the stack and replace them with a list +with just the top `n` items in reverse order. - [a b c d] 2 take + [a b c d] 2 take ---------------------- - [b a] - -Gentzen diagram. + [b a] ### Definition -if not basis. +> [\<\<\{\}] \[[shift]\] [times] [pop] -### Derivation - -if not basis. - -### Source - -if basis - -### Discussion - -Lorem ipsum. - -### Crosslinks - -Lorem ipsum. -------------------- ## ternary -(Combinator) - +Combinator Run a quoted program using exactly three stack values and leave the first item of the result on the stack. - ... z y x [P] unary + ... z y x [P] ternary ------------------------- - ... A + ... a ### Definition - binary popd +> [binary] [popd] ### Discussion @@ -3752,75 +3729,70 @@ consuming exactly three items from the stack. ## third -Basis Function Combinator +Function - ([a1 a2 a3 ...1] -- a3) - -Gentzen diagram. + [a b c ...] third + ----------------------- + c ### Definition -if not basis. - -### Derivation - -if not basis. - -### Source - -if basis - -### Discussion - -Lorem ipsum. +> [rest] [second] ### Crosslinks -Lorem ipsum. +[first] +[second] +[fourth] +[rest] + ------------------------------------------------------------------------ ## times -Basis Function Combinator +Combinator -times == \[\-- dip\] cons \[swap\] infra \[0 \>\] swap while pop : +Expect a quoted program and an integer `n` on the stack and do the +program `n` times. - ... n [Q] . times - --------------------- w/ n <= 0 - ... . + ... n [Q] . times + ----------------------- w/ n <= 0 + ... . - - ... 1 [Q] . times + ... 1 [Q] . times ----------------------- - ... . Q + ... . Q - - ... n [Q] . times + ... n [Q] . times ------------------------------------- w/ n > 1 - ... . Q (n - 1) [Q] times - -Gentzen diagram. + ... . Q (n-1) [Q] times ### Definition -if not basis. +> \[\-- dip\] cons \[swap\] infra \[0 \>\] swap while pop : -### Derivation - -if not basis. - -### Source - -if basis ### Discussion -Lorem ipsum. +This works by building a little [while] program and running it: -### Crosslinks + 1 3 [++] • [-- dip] cons [swap] infra [0 >] swap while pop + 1 3 [++] [-- dip] • cons [swap] infra [0 >] swap while pop + 1 3 [[++] -- dip] • [swap] infra [0 >] swap while pop + 1 3 [[++] -- dip] [swap] • infra [0 >] swap while pop + dip -- [++] • swap [3 1] swaack [0 >] swap while pop + dip [++] -- • [3 1] swaack [0 >] swap while pop + dip [++] -- [3 1] • swaack [0 >] swap while pop + 1 3 [-- [++] dip] • [0 >] swap while pop + 1 3 [-- [++] dip] [0 >] • swap while pop + 1 3 [0 >] [-- [++] dip] • while pop + +This is a common pattern in Joy. You accept some parameters from the +stack which typically include qouted programs and use them to build +another program which does the actual work. This is kind of like macros +in Lisp, or preprocessor directives in C. -Lorem ipsum. -------------- @@ -3833,31 +3805,23 @@ See [bool](#bool). ## tuck -Basis Function Combinator +Function - (a2 a1 -- a1 a2 a1) +[dup] the item on the top of the stack under the second item on the +stack. -Gentzen diagram. + a b tuck + -------------- + b a b ### Definition -if not basis. - -### Derivation - -if not basis. - -### Source - -if basis - -### Discussion - -Lorem ipsum. +> [dup] \[[swap]\] [dip] ### Crosslinks -Lorem ipsum. +[over] + -------------------- @@ -3865,15 +3829,16 @@ Lorem ipsum. (Combinator) -Run a quoted program using exactly one stack value and leave the first item of the result on the stack. +Run a quoted program using exactly one stack value and leave the first +item of the result on the stack. ... x [P] unary --------------------- - ... A + ... a ### Definition - nullary popd +> [nullary] [popd] ### Discussion @@ -3891,147 +3856,85 @@ consuming exactly one item from the stack. ## uncons -(Basis Function) +Basis Function Removes an item from a list and leaves it on the stack under the rest of the list. You cannot `uncons` an item from an empty list. - [A ...] uncons + [a ...] uncons -------------------- - A [...] - -### Source - - func(uncons, Si, So) :- func(cons, So, Si). + a [...] ### Discussion -This is the inverse of `cons`. +This is the inverse of [cons]. ### Crosslinks -[cons](#cons) +[cons] ------------------------------------------------------------------------ ## unique -Basis Function Combinator +Function Given a list remove duplicate items. -Gentzen diagram. - -### Definition - -if not basis. - -### Derivation - -if not basis. - -### Source - -if basis - -### Discussion - -Lorem ipsum. - -### Crosslinks - -Lorem ipsum. ------------------------------------------------------------------------ ## unit -Basis Function Combinator +Function - (a1 -- [a1 ]) - -Gentzen diagram. + a unit + ------------ + [a] ### Definition -if not basis. +> \[\] [cons] -### Derivation - -if not basis. - -### Source - -if basis - -### Discussion - -Lorem ipsum. - -### Crosslinks - -Lorem ipsum. ------------------------------------------------------------------------ ## unquoted -Basis Function Combinator +Combinator -\[i\] dip +Unquote (using [i]) the list that is second on the stack. -Gentzen diagram. +### Example + + 1 2 [3 4] 5 unquoted + -------------------------- + 1 2 3 4 5 ### Definition -if not basis. - -### Derivation - -if not basis. - -### Source - -if basis - -### Discussion - -Lorem ipsum. +> \[[i]\] [dip] ### Crosslinks -Lorem ipsum. +[unit] + ------------------------------------------------------------------------ ## unswons -Basis Function Combinator +Function - ([a1 ...1] -- [...1] a1) - -Gentzen diagram. + [a ...] unswons + --------------------- + [...] a ### Definition -if not basis. +> [uncons] [swap] -### Derivation - -if not basis. - -### Source - -if basis - -### Discussion - -Lorem ipsum. - -### Crosslinks - -Lorem ipsum. ------------------------------------------------------------------------ diff --git a/docs/reference/tailrec.md b/docs/reference/tailrec.md index ed5d81e..470a369 100644 --- a/docs/reference/tailrec.md +++ b/docs/reference/tailrec.md @@ -2,28 +2,24 @@ ## tailrec -Basis Function Combinator +Combinator -\[i\] genrec - -Gentzen diagram. +A specialization of the [genrec] combinator. ### Definition -if not basis. - -### Derivation - -if not basis. - -### Source - -if basis +> \[[i]\] [genrec] ### Discussion -Lorem ipsum. +Some recursive functions do not need to store additional data or pending +actions per-call. These are called ["tail recursive" functions](https://en.wikipedia.org/wiki/Tail_recursive). In Joy, +they appear as [genrec] definitions that have [i] for the second half of +their recursive branch. + +See the [Recursion Combinators notebook](https://joypy.osdn.io/notebooks/Recursion_Combinators.html). ### Crosslinks -Lorem ipsum. +[genrec] + diff --git a/docs/reference/take.md b/docs/reference/take.md index d16a1fe..18b3818 100644 --- a/docs/reference/take.md +++ b/docs/reference/take.md @@ -2,34 +2,16 @@ ## take -Basis Function Combinator +Function -Expects an integer and a quote on the stack and returns the quote with -just the top n items in reverse order (because that\'s easier and you -can use reverse if needed.) : +Expects an integer `n` and a list on the stack and replace them with a list +with just the top `n` items in reverse order. - [a b c d] 2 take + [a b c d] 2 take ---------------------- - [b a] - -Gentzen diagram. + [b a] ### Definition -if not basis. +> [\<\<\{\}] \[[shift]\] [times] [pop] -### Derivation - -if not basis. - -### Source - -if basis - -### Discussion - -Lorem ipsum. - -### Crosslinks - -Lorem ipsum. diff --git a/docs/reference/ternary.md b/docs/reference/ternary.md index 856b162..1b80944 100644 --- a/docs/reference/ternary.md +++ b/docs/reference/ternary.md @@ -2,19 +2,18 @@ ## ternary -(Combinator) - +Combinator Run a quoted program using exactly three stack values and leave the first item of the result on the stack. - ... z y x [P] unary + ... z y x [P] ternary ------------------------- - ... A + ... a ### Definition - binary popd +> [binary] [popd] ### Discussion diff --git a/docs/reference/third.md b/docs/reference/third.md index dc74576..ae482b1 100644 --- a/docs/reference/third.md +++ b/docs/reference/third.md @@ -2,28 +2,20 @@ ## third -Basis Function Combinator +Function - ([a1 a2 a3 ...1] -- a3) - -Gentzen diagram. + [a b c ...] third + ----------------------- + c ### Definition -if not basis. - -### Derivation - -if not basis. - -### Source - -if basis - -### Discussion - -Lorem ipsum. +> [rest] [second] ### Crosslinks -Lorem ipsum. +[first] +[second] +[fourth] +[rest] + diff --git a/docs/reference/times.md b/docs/reference/times.md index d64acde..eae8e4f 100644 --- a/docs/reference/times.md +++ b/docs/reference/times.md @@ -2,42 +2,45 @@ ## times -Basis Function Combinator +Combinator -times == \[\-- dip\] cons \[swap\] infra \[0 \>\] swap while pop : +Expect a quoted program and an integer `n` on the stack and do the +program `n` times. - ... n [Q] . times - --------------------- w/ n <= 0 - ... . + ... n [Q] . times + ----------------------- w/ n <= 0 + ... . - - ... 1 [Q] . times + ... 1 [Q] . times ----------------------- - ... . Q + ... . Q - - ... n [Q] . times + ... n [Q] . times ------------------------------------- w/ n > 1 - ... . Q (n - 1) [Q] times - -Gentzen diagram. + ... . Q (n-1) [Q] times ### Definition -if not basis. +> \[\-- dip\] cons \[swap\] infra \[0 \>\] swap while pop : -### Derivation - -if not basis. - -### Source - -if basis ### Discussion -Lorem ipsum. +This works by building a little [while] program and running it: -### Crosslinks + 1 3 [++] • [-- dip] cons [swap] infra [0 >] swap while pop + 1 3 [++] [-- dip] • cons [swap] infra [0 >] swap while pop + 1 3 [[++] -- dip] • [swap] infra [0 >] swap while pop + 1 3 [[++] -- dip] [swap] • infra [0 >] swap while pop + dip -- [++] • swap [3 1] swaack [0 >] swap while pop + dip [++] -- • [3 1] swaack [0 >] swap while pop + dip [++] -- [3 1] • swaack [0 >] swap while pop + 1 3 [-- [++] dip] • [0 >] swap while pop + 1 3 [-- [++] dip] [0 >] • swap while pop + 1 3 [0 >] [-- [++] dip] • while pop + +This is a common pattern in Joy. You accept some parameters from the +stack which typically include qouted programs and use them to build +another program which does the actual work. This is kind of like macros +in Lisp, or preprocessor directives in C. -Lorem ipsum. diff --git a/docs/reference/tuck.md b/docs/reference/tuck.md index d0700de..2668fc0 100644 --- a/docs/reference/tuck.md +++ b/docs/reference/tuck.md @@ -2,28 +2,20 @@ ## tuck -Basis Function Combinator +Function - (a2 a1 -- a1 a2 a1) +[dup] the item on the top of the stack under the second item on the +stack. -Gentzen diagram. + a b tuck + -------------- + b a b ### Definition -if not basis. - -### Derivation - -if not basis. - -### Source - -if basis - -### Discussion - -Lorem ipsum. +> [dup] \[[swap]\] [dip] ### Crosslinks -Lorem ipsum. +[over] + diff --git a/docs/reference/unary.md b/docs/reference/unary.md index ccd3ea4..a03cd7e 100644 --- a/docs/reference/unary.md +++ b/docs/reference/unary.md @@ -4,15 +4,16 @@ (Combinator) -Run a quoted program using exactly one stack value and leave the first item of the result on the stack. +Run a quoted program using exactly one stack value and leave the first +item of the result on the stack. ... x [P] unary --------------------- - ... A + ... a ### Definition - nullary popd +> [nullary] [popd] ### Discussion diff --git a/docs/reference/uncons.md b/docs/reference/uncons.md index 39f1d63..647c92d 100644 --- a/docs/reference/uncons.md +++ b/docs/reference/uncons.md @@ -2,24 +2,20 @@ ## uncons -(Basis Function) +Basis Function Removes an item from a list and leaves it on the stack under the rest of the list. You cannot `uncons` an item from an empty list. - [A ...] uncons + [a ...] uncons -------------------- - A [...] - -### Source - - func(uncons, Si, So) :- func(cons, So, Si). + a [...] ### Discussion -This is the inverse of `cons`. +This is the inverse of [cons]. ### Crosslinks -[cons](#cons) +[cons] diff --git a/docs/reference/unique.md b/docs/reference/unique.md index 687876c..2cc39c9 100644 --- a/docs/reference/unique.md +++ b/docs/reference/unique.md @@ -2,28 +2,7 @@ ## unique -Basis Function Combinator +Function Given a list remove duplicate items. -Gentzen diagram. - -### Definition - -if not basis. - -### Derivation - -if not basis. - -### Source - -if basis - -### Discussion - -Lorem ipsum. - -### Crosslinks - -Lorem ipsum. diff --git a/docs/reference/unit.md b/docs/reference/unit.md index ccd479e..0bfa28a 100644 --- a/docs/reference/unit.md +++ b/docs/reference/unit.md @@ -2,28 +2,13 @@ ## unit -Basis Function Combinator +Function - (a1 -- [a1 ]) - -Gentzen diagram. + a unit + ------------ + [a] ### Definition -if not basis. +> \[\] [cons] -### Derivation - -if not basis. - -### Source - -if basis - -### Discussion - -Lorem ipsum. - -### Crosslinks - -Lorem ipsum. diff --git a/docs/reference/unquoted.md b/docs/reference/unquoted.md index 6f44120..6f508b1 100644 --- a/docs/reference/unquoted.md +++ b/docs/reference/unquoted.md @@ -2,28 +2,21 @@ ## unquoted -Basis Function Combinator +Combinator -\[i\] dip +Unquote (using [i]) the list that is second on the stack. -Gentzen diagram. +### Example + + 1 2 [3 4] 5 unquoted + -------------------------- + 1 2 3 4 5 ### Definition -if not basis. - -### Derivation - -if not basis. - -### Source - -if basis - -### Discussion - -Lorem ipsum. +> \[[i]\] [dip] ### Crosslinks -Lorem ipsum. +[unit] + diff --git a/docs/reference/unswons.md b/docs/reference/unswons.md index 0fe4953..52bf383 100644 --- a/docs/reference/unswons.md +++ b/docs/reference/unswons.md @@ -2,28 +2,13 @@ ## unswons -Basis Function Combinator +Function - ([a1 ...1] -- [...1] a1) - -Gentzen diagram. + [a ...] unswons + --------------------- + [...] a ### Definition -if not basis. +> [uncons] [swap] -### Derivation - -if not basis. - -### Source - -if basis - -### Discussion - -Lorem ipsum. - -### Crosslinks - -Lorem ipsum. diff --git a/implementations/defs.txt b/implementations/defs.txt index 33a5311..c152e90 100644 --- a/implementations/defs.txt +++ b/implementations/defs.txt @@ -90,7 +90,7 @@ swons swap cons swoncat swap concat sqr dup mul tailrec [i] genrec -take [] roll> [shift] times pop +take <<{} [shift] times pop ternary binary popd third rest second tuck dup swapd