From d723724193acd16945a83d62bf1d61b052a6c620 Mon Sep 17 00:00:00 2001 From: sforman Date: Sat, 30 Sep 2023 14:41:39 -0700 Subject: [PATCH] Mark combinators. --- docs/html/FuncRef.html | 390 +++++++---------------------------- docs/html/css/func_ref.css | 7 + docs/reference/Function-Reference.md | 80 +++---- docs/reference/to_html.py | 24 ++- 4 files changed, 144 insertions(+), 357 deletions(-) diff --git a/docs/html/FuncRef.html b/docs/html/FuncRef.html index 5e326d2..7422c66 100644 --- a/docs/html/FuncRef.html +++ b/docs/html/FuncRef.html @@ -1,6 +1,5 @@ Thun Function Reference

Thun Function Reference

Home

Version -10.0.0

Each function, combinator, or definition should be documented here.

!- ¶

 
-## !-
 
 Function
 
@@ -28,27 +27,22 @@ zero.
 
 

!= ¶

 
-## !=
 
 See [ne](#ne).
 
 

% ¶

 
-## %
 
 See [mod](#mod).
 
 

& ¶

 
-## &
 
 See [and](#and).
 
-

&& ¶

+

&& ¶

combinator

 
-## &&
 
-Combinator
 
 Short-circuiting Boolean AND
 
@@ -87,67 +81,56 @@ This is seldom useful, I suspect, but this way you have it.
 
 

* ¶

 
-## *
 
 See [mul](#mul).
 
 

+ ¶

 
-## +
 
 See [add](#add).
 
 

++ ¶

 
-## ++
 
 See [succ](#succ).
 
 

- ¶

 
-## -
 
 See [sub](#sub).
 
 

-- ¶

 
-## --
 
 See [pred](#pred).
 
 

/ ¶

 
-## /
 
 See [floordiv](#floordiv).
 
 

// ¶

 
-## //
 
 See [floordiv](#floordiv).
 
 

/floor ¶

 
-## /floor
 
 See [floordiv](#floordiv).
 
 

< ¶

 
-## <
 
 See [lt](#lt).
 
 

<< ¶

 
-## <<
 
 See [lshift](#lshift).
 
 

<<{} ¶

 
-## <<{}
 
 Function
 
@@ -172,19 +155,16 @@ Tuck an empty list just under the first two items on the stack.
 
 

<= ¶

 
-## <=
 
 See [le](#le).
 
 

<> ¶

 
-## <>
 
 See [ne](#ne).
 
 

<{} ¶

 
-## <{}
 
 Function
 
@@ -208,31 +188,26 @@ Tuck an empty list just under the first item on the stack.
 
 

= ¶

 
-## =
 
 See [eq](#eq).
 
 

> ¶

 
-## >
 
 See [gt](#gt).
 
 

>= ¶

 
-## >=
 
 See [ge](#ge).
 
 

>> ¶

 
-## >>
 
 See [rshift](#rshift).
 
 

? ¶

 
-## ?
 
 Function
 
@@ -253,13 +228,11 @@ consuming the item.
 
 

^ ¶

 
-## ^
 
 See [xor](#xor).
 
 

abs ¶

 
-## abs
 
 Function
 
@@ -271,17 +244,14 @@ Return the absolute value of the argument.
 
 

add ¶

 
-## add
 
-Basis Function
+Function
 
 Add two numbers together: a + b.
 
-

anamorphism ¶

+

anamorphism ¶

combinator

 
-## anamorphism
 
-Combinator
 
 Build a list of values from a generator program `G` and a stopping
 predicate `P`.
@@ -306,9 +276,8 @@ See the [Recursion Combinators notebook](https://joypy.osdn.io/notebooks/Recursi
 
 

and ¶

 
-## and
 
-Basis Function
+Function
 
 Logical bit-wise AND.
 
@@ -317,13 +286,11 @@ Logical bit-wise AND.
 [or](#or)
 [xor](#xor)
 
-

app1 ¶

+

app1 ¶

combinator

 
-## app1
 
 "apply one"
 
-Combinator
 
 Given a quoted program on TOS and anything as the second stack item run
 the program without disturbing the stack and replace the two args with
@@ -351,11 +318,9 @@ are more useful.
 [appN](#appN)
 [unary](#unary)
 
-

app2 ¶

+

app2 ¶

combinator

 
-## app2
 
-Combinator
 
 Like [app1](#app1) with two items.
 
@@ -387,11 +352,9 @@ should) be done.
 [appN](#appN)
 [unary](#unary)
 
-

app3 ¶

+

app3 ¶

combinator

 
-## app3
 
-Combinator
 
 Like [app1] with three items.
 
@@ -416,11 +379,9 @@ See [app2].
 [appN](#appN)
 [unary](#unary)
 
-

appN ¶

+

appN ¶

combinator

 
-## appN
 
-Combinator
 
 Like [app1] with any number of items.
 
@@ -450,13 +411,11 @@ function that many times on that many stack items.  See also [app2].
 
 

at ¶

 
-## at
 
 See [getitem](#getitem).
 
 

average ¶

 
-## average
 
 Function
 
@@ -478,11 +437,9 @@ As an exercise in Functional Programming in Joy it would be fun to
 convert this into a catamorphism.
 See the [Recursion Combinators notebook](https://joypy.osdn.io/notebooks/Recursion_Combinators.html).
 
-

b ¶

+

b ¶

combinator

 
-## b
 
-Combinator
 
 Run two quoted programs
 
@@ -503,11 +460,9 @@ This combinator may seem trivial but it comes in handy.
 [dupdip](#dupdip)
 [ii](#ii)
 
-

binary ¶

+

binary ¶

combinator

 
-## binary
 
-Combinator
 
 Run a quoted program using exactly two stack values and leave the first
 item of the result on the stack.
@@ -533,9 +488,8 @@ consuming exactly two items from the stack.
 
 

bool ¶

 
-## bool
 
-Basis Function
+Function
 
 Convert the item on the top of the stack to a Boolean value.
 
@@ -548,11 +502,9 @@ empty list is `false` and all other lists are `true`.
 
 [not]
 
-

branch ¶

+

branch ¶

combinator

 
-## branch
 
-Basis Combinator
 
 Use a Boolean value to select and run one of two quoted programs.
 
@@ -584,7 +536,6 @@ terms of [choice] as above).  The more common "if..then..else" construct
 
 

ccccons ¶

 
-## ccccons
 
 Function
 
@@ -604,7 +555,6 @@ Do [cons] four times.
 
 

ccons ¶

 
-## ccons
 
 Function
 
@@ -625,9 +575,8 @@ Do [cons] two times.
 
 

choice ¶

 
-## choice
 
-Basis Function
+Function
 
 Use a Boolean value to select one of two items.
 
@@ -655,9 +604,8 @@ the other way around.
 
 

clear ¶

 
-## clear
 
-Basis Function
+Function
 
 Clear everything from the stack.
 
@@ -670,11 +618,9 @@ Clear everything from the stack.
 [stack]
 [swaack]
 
-

cleave ¶

+

cleave ¶

combinator

 
-## cleave
 
-Combinator
 
 Run two programs in parallel, consuming one additional item, and put their
 results on the stack.
@@ -703,11 +649,9 @@ One of a handful of useful parallel combinators.
 [fork]
 [map]
 
-

clop ¶

+

clop ¶

combinator

 
-## clop
 
-Combinator
 
 Run two programs in parallel, consuming two additional items, and put their results on the stack.
 
@@ -733,11 +677,9 @@ Like [cleave] but consumes an additional item from the stack.
 [fork]
 [map]
 
-

cmp ¶

+

cmp ¶

combinator

 
-## cmp
 
-Combinator
 
 Take two values and three quoted programs on the stack and run one
 of the three depending on the results of comparing the two values.
@@ -771,11 +713,9 @@ Or even:
 
 TODO: link to tree notebooks where this was used.
 
-

codi ¶

+

codi ¶

combinator

 
-## codi
 
-Combinator
 
 Take a quoted program from the stack, [cons] the next item onto it, then
 [dip] the whole thing under what was the third item on the stack.
@@ -798,11 +738,9 @@ useful in a few places.
 [appN]
 [codireco]
 
-

codireco ¶

+

codireco ¶

combinator

 
-## codireco
 
-Combinator
 
 This is part of the [make_generator] function.  You would not use this
 combinator directly.
@@ -824,7 +762,6 @@ as well as
 
 

concat ¶

 
-## concat
 
 Function
 
@@ -856,11 +793,9 @@ Concatinate two lists.
 [third]
 [zip]
 
-

cond ¶

+

cond ¶

combinator

 
-## cond
 
-Combinator
 
 This combinator works like a case statement. It expects a single quote
 on the stack that must contain zero or more condition quotes and a
@@ -893,9 +828,8 @@ expressions, e.g.:
 
 

cons ¶

 
-## cons
 
-Basis Function
+Function
 
 Given an item and a list, append the item to the list to make a new list.
 
@@ -912,11 +846,9 @@ Its inverse operation is [uncons].
 
 [uncons]
 
-

dinfrirst ¶

+

dinfrirst ¶

combinator

 
-## dinfrirst
 
-Combinator
 
 Specialist function (that means I forgot what it does and why.)
 
@@ -924,11 +856,9 @@ Specialist function (that means I forgot what it does and why.)
 
 > [dip] [infrst]
 
-

dip ¶

+

dip ¶

combinator

 
-## dip
 
-Basis Combinator
 
 The `dip` combinator expects a quoted program on the stack and below it
 some item, it hoists the item into the expression and runs the program
@@ -963,11 +893,9 @@ pending expression (not counting modifications to the dictionary.)
 [dupdipd]
 [infra]
 
-

dipd ¶

+

dipd ¶

combinator

 
-## dipd
 
-Combinator
 
 Like [dip] but expects two items.
 
@@ -986,11 +914,9 @@ See [dip].
 [dupdip]
 [dupdipd]
 [infra]
-

dipdd ¶

+

dipdd ¶

combinator

 
-## dipdd
 
-Combinator
 
 Like [dip] but expects three items. :
 
@@ -1011,7 +937,6 @@ See [dip].
 
 

disenstacken ¶

 
-## disenstacken
 
 Function
 
@@ -1040,13 +965,11 @@ printed with the top or head on the left.
 
 

div ¶

 
-## div
 
 See [floordiv](#floordiv).
 
 

divmod ¶

 
-## divmod
 
 Function
 
@@ -1064,7 +987,6 @@ Invariant: `qy + r = x`.
 
 

down_to_zero ¶

 
-## down_to_zero
 
 Function
 
@@ -1087,7 +1009,6 @@ zero) less than that onto the stack.
 
 

drop ¶

 
-## drop
 
 Function
 
@@ -1110,9 +1031,8 @@ items removed off the top.
 
 

dup ¶

 
-## dup
 
-Basis Function
+Function
 
 "Dup"licate the top item on the stack.
 
@@ -1129,7 +1049,6 @@ Basis Function
 
 

dupd ¶

 
-## dupd
 
 Function
 
@@ -1152,7 +1071,6 @@ Function
 
 

dupdd ¶

 
-## dupdd
 
 Function
 
@@ -1173,11 +1091,9 @@ Function
 [dupdip]
 [dupdipd]
 
-

dupdip ¶

+

dupdip ¶

combinator

 
-## dupdip
 
-Combinator
 
 Apply a function `F` and [dup] the item under it on the stack.
 
@@ -1206,11 +1122,9 @@ A very common and useful combinator.
 
 [dupdipd]
 
-

dupdipd ¶

+

dupdipd ¶

combinator

 
-## dupdipd
 
-Combinator
 
 Run a copy of program `F` under the next item down on the stack.
 
@@ -1228,7 +1142,6 @@ Run a copy of program `F` under the next item down on the stack.
 
 

enstacken ¶

 
-## enstacken
 
 Function
 
@@ -1256,9 +1169,8 @@ This is a destructive version of [stack].  See the note under
 
 

eq ¶

 
-## eq
 
-Basis Function
+Function
 
 Compare the two items on the top of the stack for equality and replace
 them with a Boolean value.
@@ -1279,7 +1191,6 @@ them with a Boolean value.
 
 

first ¶

 
-## first
 
 Function
 
@@ -1302,7 +1213,6 @@ Replace a list with its first item.
 
 

first_two ¶

 
-## first_two
 
 Function
 
@@ -1326,7 +1236,6 @@ Replace a list with its first two items.
 
 

flatten ¶

 
-## flatten
 
 Function
 
@@ -1371,9 +1280,8 @@ Note that only one "level" of lists is flattened.  In the example above
 
 

floor ¶

 
-## floor
 
-Basis Function
+Function
 
 Return the largest integer \<= x.
 
@@ -1384,9 +1292,8 @@ only integers in the system.
 
 

floordiv ¶

 
-## floordiv
 
-Basis Function
+Function
 
 I don't know why this is called "floor" div, I think it rounds its
 result down (not towards zero or up.)
@@ -1404,11 +1311,9 @@ for Thun gets nailed down.
 
 [divmod]
 
-

fork ¶

+

fork ¶

combinator

 
-## fork
 
-Combinator
 
 Run two quoted programs in parallel and replace them with their results.
 
@@ -1432,7 +1337,6 @@ The basic parallelism combinator, the two programs are run independently.
 
 

fourth ¶

 
-## fourth
 
 Function
 
@@ -1455,7 +1359,6 @@ Replace a list with its fourth item.
 
 

gcd ¶

 
-## gcd
 
 Function
 
@@ -1472,7 +1375,6 @@ Euclid's Algorithm
 
 

gcd2 ¶

 
-## gcd2
 
 Function
 
@@ -1488,9 +1390,8 @@ See [gcd].
 
 

ge ¶

 
-## ge
 
-Basis Function
+Function
 
 Greater-than-or-equal-to comparison of two numbers.
 
@@ -1508,11 +1409,9 @@ Greater-than-or-equal-to comparison of two numbers.
 [lt]
 [ne]
 
-

genrec ¶

+

genrec ¶

combinator

 
-## genrec
 
-Combinator
 
 **Gen**eral **Rec**ursion Combinator. 
 
@@ -1581,7 +1480,6 @@ Tail recursive functions are those where `R2` is the `i` combinator:
 
 

getitem ¶

 
-## getitem
 
 Function
 
@@ -1627,7 +1525,6 @@ implementation-dependant.)
 [zip]
 

grabN ¶

 
-## grabN
 
 Function
 
@@ -1644,7 +1541,6 @@ Expect a number on the top of the stack and [cons] that many items from under it
 > [\<\{\}] \[[cons]\] [times]
 

grba ¶

 
-## grba
 
 Function
 
@@ -1670,9 +1566,8 @@ It's part of the [app2] definition.
 [app2]
 

gt ¶

 
-## gt
 
-Basis Function
+Function
 
 Greater-than comparison of two numbers.
 
@@ -1691,7 +1586,6 @@ Greater-than comparison of two numbers.
 [ne]
 

help ¶

 
-## help
 
 Function
 
@@ -1708,7 +1602,6 @@ item on the top of the stack is a quoted symbol.
 
 

hypot ¶

 
-## hypot
 
 Function
 
@@ -1728,11 +1621,9 @@ This is another function that has to wait on the numeric tower.
 
 [sqrt]
 
-

i ¶

+

i ¶

combinator

 
-## i
 
-Basis Combinator
 
 Append a quoted expression onto the pending expression.
 
@@ -1748,20 +1639,17 @@ example, the [x] combinator can be defined as `dup i`.
 
 

id ¶

 
-## id
 
-Basis Function
+Function
 
 The identity function.
 
 ### Discussion
 
 Does nothing.  It's kind of a mathematical thing, but it occasionally comes in handy.
-

ifte ¶

+

ifte ¶

combinator

 
-## ifte
 
-Combinator
 
 If-Then-Else combinator, a common and convenient specialization of [branch].
 
@@ -1778,11 +1666,9 @@ If-Then-Else combinator, a common and convenient specialization of [branch].
 [branch]
 [loop]
 [while]
-

ii ¶

+

ii ¶

combinator

 
-## ii
 
-Combinator
 
 Take a quoted program from the stack and run it twice, first under the
 top item, then again with the top item.
@@ -1825,11 +1711,9 @@ In some cases (like the example above) this is the same effect as using [app2] b
 
 [app2]
 [b]
-

infra ¶

+

infra ¶

combinator

 
-## infra
 
-Combinator
 
 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.)
@@ -1864,11 +1748,9 @@ kind of "pocket universe".  If the list represents a datastructure then
 
 [swaack](#swaack)
 
-

infrst ¶

+

infrst ¶

combinator

 
-## infrst
 
-Combinator
 
 Does [infra] and then extracts the [first] item from the resulting list.
 
@@ -1878,7 +1760,6 @@ Does [infra] and then extracts the [first] item from the resulting list.
 
 

inscribe ¶

 
-## inscribe
 
 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.
@@ -1895,9 +1776,8 @@ the `defs.txt` file.  It can be abused, which you should avoid unless you
 know what you're doing.
 

le ¶

 
-## le
 
-Basis Function
+Function
 
 Less-Than-or-Equal-to comparison of the two items on the top of the
 stack, replacing them with a Boolean value.
@@ -1915,11 +1795,9 @@ stack, replacing them with a Boolean value.
 [gt]
 [lt]
 [ne]
-

loop ¶

+

loop ¶

combinator

 
-## loop
 
-Basis Combinator
 
 Expect a quoted program `Q` and a Boolean value on the stack.  If the value is false
 discard the quoted program, otherwise run a copy of `Q` and `loop` again.
@@ -1953,9 +1831,8 @@ Just as [branch] has it's more common and convenient form [ifte],
 [while]
 

lshift ¶

 
-## lshift
 
-Basis Function
+Function
 
 [Logical Left-Shift](https://en.wikipedia.org/wiki/Logical_shift)
 
@@ -1968,9 +1845,8 @@ Basis Function
 [rshift]
 

lt ¶

 
-## lt
 
-Basis Function
+Function
 
 Less-Than comparison of the two items on the top of the
 stack, replacing them with a Boolean value.
@@ -1990,7 +1866,6 @@ stack, replacing them with a Boolean value.
 [ne]
 

make_generator ¶

 
-## make_generator
 
 Function
 
@@ -2025,11 +1900,9 @@ See the ["Using `x` to Generate Values" notebook](https://joypy.osdn.io/notebook
 
 [codireco]
 
-

map ¶

+

map ¶

combinator

 
-## map
 
-Combinator
 
 Given a list of items and a quoted program run the program for each item
 in the list (with the rest of the stack) and replace the old list and the
@@ -2056,9 +1929,8 @@ parallelism combinator due to the "pure" nature of the language.
 
 

max ¶

 
-## max
 
-Basis Function
+Function
 
 Given a list find the maximum.
 
@@ -2076,9 +1948,8 @@ Given a list find the maximum.
 
 

min ¶

 
-## min
 
-Basis Function
+Function
 
 Given a list find the minimum.
 
@@ -2096,9 +1967,8 @@ Given a list find the minimum.
 
 

mod ¶

 
-## mod
 
-Basis Function
+Function
 
 Return the remainder of `a` divided by `b`.
 
@@ -2113,15 +1983,13 @@ Return the remainder of `a` divided by `b`.
 
 

modulus ¶

 
-## modulus
 
 See [mod](#mod).
 
 

mul ¶

 
-## mul
 
-Basis Function
+Function
 
 Multiply two numbers.
 
@@ -2136,9 +2004,8 @@ Multiply two numbers.
 
 

ne ¶

 
-## ne
 
-Basis Function
+Function
 
 Not-Equal comparison of the two items on the top of the
 stack, replacing them with a Boolean value.
@@ -2158,7 +2025,6 @@ stack, replacing them with a Boolean value.
 [lt]
 

neg ¶

 
-## neg
 
 Function
 
@@ -2173,7 +2039,6 @@ Invert the sign of a number.
 
 

not ¶

 
-## not
 
 Function
 
@@ -2198,7 +2063,6 @@ Boolean value.
 
 

nulco ¶

 
-## nulco
 
 Function
 
@@ -2221,11 +2085,9 @@ Helper function for [\|\|] and [&&].
 [&&]
 [\|\|]
 
-

nullary ¶

+

nullary ¶

combinator

 
-## nullary
 
-Combinator
 
 Run a quoted program without using any stack values and leave the first
 item of the result on the stack.
@@ -2261,7 +2123,6 @@ program.)
 
 

of ¶

 
-## of
 
 Function
 
@@ -2283,9 +2144,8 @@ Like [getitem] but [swap]s the order of arguments.
 
 

or ¶

 
-## or
 
-Basis Function
+Function
 
 Logical bit-wise OR.
 
@@ -2296,7 +2156,6 @@ Logical bit-wise OR.
 
 

over ¶

 
-## over
 
 Function
 
@@ -2330,11 +2189,9 @@ A fine old word from Forth.
 
 [tuck]
 
-

pam ¶

+

pam ¶

combinator

 
-## pam
 
-Combinator
 
 Take a list of quoted functions from the stack and replace it with a list
 of the [first] results from running those functions (on copies of the
@@ -2361,13 +2218,11 @@ the underlying [map] function is so implemented, of course.)
 
 

pick ¶

 
-## pick
 
 See [getitem](#getitem).
 
 

pm ¶

 
-## pm
 
 Function
 
@@ -2383,9 +2238,8 @@ Plus or minus.  Replace two numbers with their sum and difference.
 
 

pop ¶

 
-## pop
 
-Basis Function
+Function
 
 Pop the top item from the stack and discard it.
 
@@ -2403,7 +2257,6 @@ Pop the top item from the stack and discard it.
 
 

popd ¶

 
-## popd
 
 Function
 
@@ -2428,7 +2281,6 @@ Function
 
 

popdd ¶

 
-## popdd
 
 Function
 
@@ -2453,7 +2305,6 @@ Function
 
 

popop ¶

 
-## popop
 
 Function
 
@@ -2477,7 +2328,6 @@ Function
 
 

popopd ¶

 
-## popopd
 
 Function
 
@@ -2502,7 +2352,6 @@ Function
 
 

popopdd ¶

 
-## popopdd
 
 Function
 
@@ -2525,7 +2374,6 @@ Function
 
 

popopop ¶

 
-## popopop
 
 Function
 
@@ -2549,9 +2397,8 @@ Function
 
 

pow ¶

 
-## pow
 
-Basis Function
+Function
 
 Take two numbers `a` and `n` from the stack and raise `a` to the `n`th
 power.  (`n` is on the top of the stack.)
@@ -2568,7 +2415,6 @@ power.  (`n` is on the top of the stack.)
 
 

pred ¶

 
-## pred
 
 Function
 
@@ -2582,11 +2428,9 @@ Predecessor. Decrement TOS.
 
 [succ]
 
-

primrec ¶

+

primrec ¶

combinator

 
-## primrec
 
-Combinator
 
 From the ["Overview of the language JOY"](https://www.kevinalbrecht.com/code/joy-mirror/j00ovr.html)
 
@@ -2628,7 +2472,6 @@ Simple and useful specialization of the [genrec] combinator from the
 
 

product ¶

 
-## product
 
 Function
 
@@ -2646,7 +2489,6 @@ Or,
 
 

quoted ¶

 
-## quoted
 
 Function
 
@@ -2670,7 +2512,6 @@ This comes from the original Joy stuff.
 
 

range ¶

 
-## range
 
 Function
 
@@ -2701,7 +2542,6 @@ If `n` is less than 1 the resulting list is empty.
 
 

range_to_zero ¶

 
-## range_to_zero
 
 Function
 
@@ -2729,7 +2569,6 @@ Note that the order is reversed compared to [range].
 
 

reco ¶

 
-## reco
 
 Function
 
@@ -2750,19 +2589,16 @@ Replace the first item in a list with the item under it.
 
 

rem ¶

 
-## rem
 
 See [mod](#mod).
 
 

remainder ¶

 
-## remainder
 
 See [mod](#mod).
 
 

remove ¶

 
-## remove
 
 Function
 
@@ -2780,9 +2616,8 @@ See the ["Remove Function" notebook](https://osdn.net/projects/joypy/scm/git/Thu
 
 

rest ¶

 
-## rest
 
-Basis Function
+Function
 
        [a ...] rest
     ------------------
@@ -2795,7 +2630,6 @@ Basis Function
 
 

reverse ¶

 
-## reverse
 
 Function
 
@@ -2813,19 +2647,16 @@ Reverse the list on the top of the stack.
 
 

roll< ¶

 
-## roll<
 
 See [rolldown](#rolldown).
 
 

roll> ¶

 
-## roll>
 
 See [rollup](#rollup).
 
 

rolldown ¶

 
-## rolldown
 
 Function
 
@@ -2843,7 +2674,6 @@ Function
 
 

rollup ¶

 
-## rollup
 
 Function
 
@@ -2861,7 +2691,6 @@ Function
 
 

round ¶

 
-## round
 
 Function
 
@@ -2874,7 +2703,6 @@ down.
 
 

rrest ¶

 
-## rrest
 
 Function
 
@@ -2891,9 +2719,8 @@ Function
 
 

rshift ¶

 
-## rshift
 
-Basis Function
+Function
 
 [Logical Right-Shift](https://en.wikipedia.org/wiki/Logical_shift)
 
@@ -2906,7 +2733,6 @@ Basis Function
 [lshift]
 

run ¶

 
-## run
 
 Function
 
@@ -2924,7 +2750,6 @@ Run a quoted program in a list.
 
 

second ¶

 
-## second
 
 Function
 
@@ -2944,9 +2769,8 @@ Function
 
 

select ¶

 
-## select
 
-Basis Function
+Function
 
 Use a Boolean value to select one of two items from a sequence. :
 
@@ -2968,7 +2792,6 @@ The sequence can contain more than two items but not fewer.
 
 

sharing ¶

 
-## sharing
 
 Function
 
@@ -2985,7 +2808,6 @@ printing out the GPL notice.
 
 

shift ¶

 
-## shift
 
 Function
 
@@ -3007,7 +2829,6 @@ Move the top item from one list to another.
 
 

shunt ¶

 
-## shunt
 
 Function
 
@@ -3036,7 +2857,6 @@ preserve order.
 
 

size ¶

 
-## size
 
 Function
 
@@ -3054,7 +2874,6 @@ Replace a list with its size.
 
 

sort ¶

 
-## sort
 
 Function
 
@@ -3068,7 +2887,6 @@ Given a list return it sorted.
 
 

spiral_next ¶

 
-## spiral_next
 
 Function
 
@@ -3080,7 +2898,6 @@ See the ["Square Spiral Example Joy Code" notebook](https://joypy.osdn.io/notebo
 
 

split_at ¶

 
-## split_at
 
 Function
 
@@ -3109,7 +2926,6 @@ on the top of the stack.
 
 

split_list ¶

 
-## split_list
 
 Function
 
@@ -3136,7 +2952,6 @@ Compare with [split_at].  This function does extra work to ensure that
 
 

sqr ¶

 
-## sqr
 
 Function
 
@@ -3152,9 +2967,8 @@ Square the number on the top of the stack.
 
 

sqrt ¶

 
-## sqrt
 
-Basis Function Combinator
+Function Combinator
 
 Return the square root of the number a. Negative numbers return complex
 roots.
@@ -3165,7 +2979,6 @@ Another "numeric tower" hatch...
 
 

stack ¶

 
-## stack
 
 Function
 
@@ -3192,7 +3005,6 @@ complement to the "destructive" pair [enstacken] and [disenstacken].
 
 

stackd ¶

 
-## stackd
 
 Function
 
@@ -3208,11 +3020,9 @@ Grab the stack under the top item and put it onto the stack.
 
 > \[[stack]\] [dip]
 
-

step ¶

+

step ¶

combinator

 
-## step
 
-Combinator
 
 Run a quoted program on each item in a sequence.
 
@@ -3238,11 +3048,9 @@ See the [Recursion Combinators notebook](https://joypy.osdn.io/notebooks/Recursi
 
 [step_zero]
 
-

step_zero ¶

+

step_zero ¶

combinator

 
-## step_zero
 
-Combinator
 
 Like [step] but with 0 as the initial value.
 
@@ -3265,7 +3073,6 @@ Like [step] but with 0 as the initial value.
 
 

stuncons ¶

 
-## stuncons
 
 Function
 
@@ -3283,7 +3090,6 @@ Take the [stack] and [uncons] the top item.
 
 

stununcons ¶

 
-## stununcons
 
 Function
 
@@ -3305,9 +3111,8 @@ Take the [stack] and [uncons] the top two items.
 
 

sub ¶

 
-## sub
 
-Basis Function
+Function
 
 Subtract the number on the top of the stack from the number below it.
 
@@ -3321,7 +3126,6 @@ Subtract the number on the top of the stack from the number below it.
 
 

succ ¶

 
-## succ
 
 Function
 
@@ -3335,11 +3139,9 @@ Successor. Increment TOS.
 
 [pred]
 
-

sum ¶

+

sum ¶

combinator

 
-## sum
 
-Combinator
 
 Given a quoted sequence of numbers return the sum.
 
@@ -3359,9 +3161,8 @@ Given a quoted sequence of numbers return the sum.
 
 

swaack ¶

 
-## swaack
 
-Basis Function
+Function
 
 Swap stack.  Take a list from the top of the stack, replace the stack
 with the list, and put the old stack onto it.
@@ -3383,9 +3184,8 @@ definition of [infra].
 
 

swap ¶

 
-## swap
 
-Basis Function
+Function
 
 Swap the top two items on the stack.
 
@@ -3399,7 +3199,6 @@ Swap the top two items on the stack.
 
 

swapd ¶

 
-## swapd
 
 Function
 
@@ -3420,7 +3219,6 @@ Swap the second and third items on the stack.
 
 

swoncat ¶

 
-## swoncat
 
 Function
 
@@ -3436,7 +3234,6 @@ Function
 
 

swons ¶

 
-## swons
 
 Function
 
@@ -3450,11 +3247,9 @@ Like [cons] but [swap] the item and list.
 
 > [swap] [cons]
 
-

tailrec ¶

+

tailrec ¶

combinator

 
-## tailrec
 
-Combinator
 
 A specialization of the [genrec] combinator.
 
@@ -3477,7 +3272,6 @@ See the [Recursion Combinators notebook](https://joypy.osdn.io/notebooks/Recursi
 
 

take ¶

 
-## take
 
 Function
 
@@ -3492,11 +3286,9 @@ with just the top `n` items in reverse order.
 
 > [\<\<\{\}] \[[shift]\] [times] [pop]
 
-

ternary ¶

+

ternary ¶

combinator

 
-## ternary
 
-Combinator
 
 Run a quoted program using exactly three stack values and leave the first
 item of the result on the stack.
@@ -3522,7 +3314,6 @@ consuming exactly three items from the stack.
 
 

third ¶

 
-## third
 
 Function
 
@@ -3541,11 +3332,9 @@ Function
 [fourth]
 [rest]
 
-

times ¶

+

times ¶

combinator

 
-## times
 
-Combinator
 
 Expect a quoted program and an integer `n` on the stack and do the
 program `n` times.
@@ -3589,13 +3378,11 @@ in Lisp, or preprocessor directives in C.
 
 

truthy ¶

 
-## truthy
 
 See [bool](#bool).
 
 

tuck ¶

 
-## tuck
 
 Function
 
@@ -3616,7 +3403,6 @@ stack.
 
 

unary ¶

 
-## unary
 
 (Combinator)
 
@@ -3644,9 +3430,8 @@ consuming exactly one item from the stack.
 
 

uncons ¶

 
-## uncons
 
-Basis Function
+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.
@@ -3665,7 +3450,6 @@ This is the inverse of [cons].
 
 

unique ¶

 
-## unique
 
 Function
 
@@ -3673,7 +3457,6 @@ Given a list remove duplicate items.
 
 

unit ¶

 
-## unit
 
 Function
 
@@ -3685,11 +3468,9 @@ Function
 
 > \[\] [cons]
 
-

unquoted ¶

+

unquoted ¶

combinator

 
-## unquoted
 
-Combinator
 
 Unquote (using [i]) the list that is second on the stack.
 
@@ -3709,7 +3490,6 @@ Unquote (using [i]) the list that is second on the stack.
 
 

unswons ¶

 
-## unswons
 
 Function
 
@@ -3723,9 +3503,8 @@ Function
 
 

void ¶

 
-## void
 
-Basis Function
+Function
 
 True if the form on TOS is void otherwise False.
 
@@ -3737,17 +3516,14 @@ This represents a binary Boolean logical formula in the arithmetic of the
 
 

warranty ¶

 
-## warranty
 
-Basis Function
+Function
 
 Print warranty information.
 
-

while ¶

+

while ¶

combinator

 
-## while
 
-Combinator
 
 A specialization of [loop] that accepts a quoted predicate program `P`
 and runs it [nullary].
@@ -3769,9 +3545,8 @@ and runs it [nullary].
 
 

words ¶

 
-## words
 
-Basis Function
+Function
 
 Print all the words in alphabetical order.
 
@@ -3783,11 +3558,9 @@ Mathematically this is a form of [id].
 
 [help]
 
-

x ¶

+

x ¶

combinator

 
-## x
 
-Combinator
 
 Take a quoted function `F` and run it with itself as the first item on
 the stack.
@@ -3811,9 +3584,8 @@ as well as
 
 

xor ¶

 
-## xor
 
-Basis Function
+Function
 
 Logical bit-wise eXclusive OR.
 
@@ -3824,7 +3596,6 @@ Logical bit-wise eXclusive OR.
 
 

zip ¶

 
-## zip
 
 Function
 
@@ -3836,11 +3607,9 @@ from each list. The smallest list sets the length of the result list.
        [1 2 3] [4 5 6] zip
     -------------------------
        [[4 1] [5 2] [6 3]]
-

|| ¶

+

|| ¶

combinator

 
-## ||
 
-Combinator
 
 Short-circuiting Boolean OR
 
@@ -3870,7 +3639,6 @@ stack.)
 [&&](#section-1)
 

• ¶

 
-## •
 
 See [id](#id).
 
diff --git a/docs/html/css/func_ref.css b/docs/html/css/func_ref.css
index cf9820c..d33f775 100644
--- a/docs/html/css/func_ref.css
+++ b/docs/html/css/func_ref.css
@@ -49,3 +49,10 @@ a.self_link:hover {
 .func_name {
  font-family: monospace, 'Inconsolata';
 }
+
+
+span.kind {
+ color: #fff;
+ background: #555;
+ padding: 0.1em;
+}
diff --git a/docs/reference/Function-Reference.md b/docs/reference/Function-Reference.md
index eac8d5c..97ff124 100644
--- a/docs/reference/Function-Reference.md
+++ b/docs/reference/Function-Reference.md
@@ -23,7 +23,7 @@ Return the absolute value of the argument.
 
 ## add
 
-Basis Function
+Function
 
 Add two numbers together: a + b.
 
@@ -109,7 +109,7 @@ See the [Recursion Combinators notebook](https://joypy.osdn.io/notebooks/Recursi
 
 ## and
 
-Basis Function
+Function
 
 Logical bit-wise AND.
 
@@ -352,7 +352,7 @@ This combinator may seem trivial but it comes in handy.
 
 ## bool
 
-Basis Function
+Function
 
 Convert the item on the top of the stack to a Boolean value.
 
@@ -370,7 +370,7 @@ empty list is `false` and all other lists are `true`.
 
 ## branch
 
-Basis Combinator
+Combinator
 
 Use a Boolean value to select and run one of two quoted programs.
 
@@ -455,7 +455,7 @@ Do [cons] two times.
 
 ## choice
 
-Basis Function
+Function
 
 Use a Boolean value to select one of two items.
 
@@ -493,7 +493,7 @@ See [xor](#xor).
 
 ## clear
 
-Basis Function
+Function
 
 Clear everything from the stack.
 
@@ -739,7 +739,7 @@ expressions, e.g.:
 
 ## cons
 
-Basis Function
+Function
 
 Given an item and a list, append the item to the list to make a new list.
 
@@ -822,7 +822,7 @@ See [dip].
 
 ## dip
 
-Basis Combinator
+Combinator
 
 The `dip` combinator expects a quoted program on the stack and below it
 some item, it hoists the item into the expression and runs the program
@@ -1069,7 +1069,7 @@ Function
 
 ## dup
 
-Basis Function
+Function
 
 "Dup"licate the top item on the stack.
 
@@ -1118,7 +1118,7 @@ This is a destructive version of [stack].  See the note under
 
 ## eq
 
-Basis Function
+Function
 
 Compare the two items on the top of the stack for equality and replace
 them with a Boolean value.
@@ -1280,7 +1280,7 @@ Note that only one "level" of lists is flattened.  In the example above
 
 ## floordiv
 
-Basis Function
+Function
 
 I don't know why this is called "floor" div, I think it rounds its
 result down (not towards zero or up.)
@@ -1303,7 +1303,7 @@ for Thun gets nailed down.
 
 ## floor
 
-Basis Function
+Function
 
 Return the largest integer \<= x.
 
@@ -1403,7 +1403,7 @@ Euclid's Algorithm
 
 ## ge
 
-Basis Function
+Function
 
 Greater-than-or-equal-to comparison of two numbers.
 
@@ -1611,7 +1611,7 @@ See [gt](#gt).
 
 ## gt
 
-Basis Function
+Function
 
 Greater-than comparison of two numbers.
 
@@ -1688,7 +1688,7 @@ This is another function that has to wait on the numeric tower.
 
 ## id
 
-Basis Function
+Function
 
 The identity function.
 
@@ -1770,7 +1770,7 @@ In some cases (like the example above) this is the same effect as using [app2] b
 
 ## i
 
-Basis Combinator
+Combinator
 
 Append a quoted expression onto the pending expression.
 
@@ -1860,7 +1860,7 @@ know what you're doing.
 
 ## le
 
-Basis Function
+Function
 
 Less-Than-or-Equal-to comparison of the two items on the top of the
 stack, replacing them with a Boolean value.
@@ -1962,7 +1962,7 @@ See [lt](#lt).
 
 ## loop
 
-Basis Combinator
+Combinator
 
 Expect a quoted program `Q` and a Boolean value on the stack.  If the value is false
 discard the quoted program, otherwise run a copy of `Q` and `loop` again.
@@ -1999,7 +1999,7 @@ Just as [branch] has it's more common and convenient form [ifte],
 
 ## lshift
 
-Basis Function
+Function
 
 [Logical Left-Shift](https://en.wikipedia.org/wiki/Logical_shift)
 
@@ -2015,7 +2015,7 @@ Basis Function
 
 ## lt
 
-Basis Function
+Function
 
 Less-Than comparison of the two items on the top of the
 stack, replacing them with a Boolean value.
@@ -2106,7 +2106,7 @@ parallelism combinator due to the "pure" nature of the language.
 
 ## max
 
-Basis Function
+Function
 
 Given a list find the maximum.
 
@@ -2127,7 +2127,7 @@ Given a list find the maximum.
 
 ## min
 
-Basis Function
+Function
 
 Given a list find the minimum.
 
@@ -2148,7 +2148,7 @@ Given a list find the minimum.
 
 ## mod
 
-Basis Function
+Function
 
 Return the remainder of `a` divided by `b`.
 
@@ -2173,7 +2173,7 @@ See [mod](#mod).
 
 ## mul
 
-Basis Function
+Function
 
 Multiply two numbers.
 
@@ -2207,7 +2207,7 @@ Invert the sign of a number.
 
 ## ne
 
-Basis Function
+Function
 
 Not-Equal comparison of the two items on the top of the
 stack, replacing them with a Boolean value.
@@ -2344,7 +2344,7 @@ Like [getitem] but [swap]s the order of arguments.
 
 ## or
 
-Basis Function
+Function
 
 Logical bit-wise OR.
 
@@ -2522,7 +2522,7 @@ Function
 
 ## pop
 
-Basis Function
+Function
 
 Pop the top item from the stack and discard it.
 
@@ -2643,7 +2643,7 @@ Function
 
 ## pow
 
-Basis Function
+Function
 
 Take two numbers `a` and `n` from the stack and raise `a` to the `n`th
 power.  (`n` is on the top of the stack.)
@@ -2907,7 +2907,7 @@ See the ["Remove Function" notebook](https://osdn.net/projects/joypy/scm/git/Thu
 
 ## rest
 
-Basis Function
+Function
 
        [a ...] rest
     ------------------
@@ -3026,7 +3026,7 @@ Function
 
 ## rshift
 
-Basis Function
+Function
 
 [Logical Right-Shift](https://en.wikipedia.org/wiki/Logical_shift)
 
@@ -3082,7 +3082,7 @@ Function
 
 ## select
 
-Basis Function
+Function
 
 Use a Boolean value to select one of two items from a sequence. :
 
@@ -3321,7 +3321,7 @@ Square the number on the top of the stack.
 
 ## sqrt
 
-Basis Function Combinator
+Function Combinator
 
 Return the square root of the number a. Negative numbers return complex
 roots.
@@ -3481,7 +3481,7 @@ Take the [stack] and [uncons] the top two items.
 
 ## sub
 
-Basis Function
+Function
 
 Subtract the number on the top of the stack from the number below it.
 
@@ -3538,7 +3538,7 @@ Given a quoted sequence of numbers return the sum.
 
 ## swaack
 
-Basis Function
+Function
 
 Swap stack.  Take a list from the top of the stack, replace the stack
 with the list, and put the old stack onto it.
@@ -3585,7 +3585,7 @@ Swap the second and third items on the stack.
 
 ## swap
 
-Basis Function
+Function
 
 Swap the top two items on the stack.
 
@@ -3836,7 +3836,7 @@ consuming exactly one item from the stack.
 
 ## uncons
 
-Basis Function
+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.
@@ -3953,7 +3953,7 @@ stack.)
 
 ## void
 
-Basis Function
+Function
 
 True if the form on TOS is void otherwise False.
 
@@ -3968,7 +3968,7 @@ This represents a binary Boolean logical formula in the arithmetic of the
 
 ## warranty
 
-Basis Function
+Function
 
 Print warranty information.
 
@@ -4002,7 +4002,7 @@ and runs it [nullary].
 
 ## words
 
-Basis Function
+Function
 
 Print all the words in alphabetical order.
 
@@ -4046,7 +4046,7 @@ as well as
 
 ## xor
 
-Basis Function
+Function
 
 Logical bit-wise eXclusive OR.
 
diff --git a/docs/reference/to_html.py b/docs/reference/to_html.py
index c938451..43be074 100644
--- a/docs/reference/to_html.py
+++ b/docs/reference/to_html.py
@@ -27,14 +27,24 @@ def anchor_for(name):
         else hashlib.sha256(name.encode()).hexdigest()
         )
 
-
-d = {}
+anchors = {}
+sections = {}
 for i, section in enumerate(k):
     for line in section:
         if line.startswith('## '):
             name = line[3:].strip()
-            d[name] = section
+            sections[name] = section
+            anchors[name] = anchor_for(name)
+            section.remove(line)
+            continue
 
+combinators = set(
+    name
+    for (name, section) in sections.items()
+    if 'Combinator' in section
+    )
+for name in combinators:
+    sections[name].remove('Combinator')
 
 doc = HTML()
 
@@ -51,20 +61,22 @@ with doc.body as b:
     b.p('Each function, combinator, or definition should be documented here.')
     #b.hr
     ul = b.ul
-    for name, section in sorted(d.items()):
+    for name, section in sorted(sections.items()):
         ul.li.a(name, href='#' + anchor_for(name))
         ul += ' '
-    for name, section in sorted(d.items()):
+    for name, section in sorted(sections.items()):
         d = b.div
         anchor_id = anchor_for(name)
         title = d.h2(name, id=anchor_id, class_='func_name')
         title += ' '
         title.a('¶', href='#' + anchor_id, class_='self_link')
+        if name in combinators:
+            d.p.span('combinator', class_='kind')
         d.pre('\n'.join(section))
         
 
 html_string = '' + str(doc)
 
-print(html_string)
+print(html_string, file=open('../html/FuncRef.html', 'w'))
 #from bs4 import BeautifulSoup
 #print(BeautifulSoup(html_string, 'html.parser').prettify())
-- 
2.11.0