diff --git a/docs/html/FuncRef.html b/docs/html/FuncRef.html index 13e4c3d..c4a346f 100644 --- a/docs/html/FuncRef.html +++ b/docs/html/FuncRef.html @@ -8,13 +8,13 @@ ---------- n >= 0 true

Definition

0 >=

Discussion

Return a Boolean value indicating if a number is greater than or equal to -zero.


!=

built-in

See neq.


%

built-in

See mod.


*

built-in

See mul.


+

built-in

See add.


++

See succ.

Definition

1 +

-

built-in

See sub.


--

See pred.

Definition

1 -

/

built-in

See div.


/\

Binary Boolean and.

Definition


<

built-in

See lt.


<<

built-in

See lshift.

Definition


<<{}

   ... b a <{}
+zero.


!=

built-in

See neq.


%

built-in

See mod.


*

built-in

See mul.


+

built-in

See add.


++

See succ.

Definition

1 +

-

built-in

See sub.


--

See pred.

Definition

1 -

/

built-in

See div.


/\

Binary Boolean and.

Definition


<

built-in

See lt.


<<

built-in

See lshift.

Definition


<<{}

   ... b a <{}
 -----------------
    ... [] b a
 

Definition

Discussion

Tuck an empty list just under the first two items on the stack.


<=

built-in

See le.


<>

built-in

See neq.


<{}

   ... a <{}
 ----------------
    ... [] a
-

Definition

[] swap

Discussion

Tuck an empty list just under the first item on the stack.


=

built-in

See eq.


>

built-in

See gt.


>=

built-in

See ge.


>>

built-in

See rshift.

Definition


?

Is the item on the top of the stack "truthy"?

Definition

Discussion

You often want to test the truth value of an item on the stack without +

Definition

[] swap

Discussion

Tuck an empty list just under the first item on the stack.


=

built-in

See eq.


>

built-in

See gt.


>=

built-in

See ge.


>>

built-in

See rshift.

Definition


?

Is the item on the top of the stack "truthy"?

Definition

Discussion

You often want to test the truth value of an item on the stack without consuming the item.


\/

Binary Boolean or.

Definition


abs

Take an integer from the stack and replace it with its absolute value.

Definition

dup 0 < [] [neg] branch

add

built-in

Take two integers from the stack and replace them with their sum.


anamorphism

combinator

Build a list of values from a generator program G and a stopping predicate P.

           [P] [G] anamorphism
@@ -113,7 +113,7 @@ empty list is false and all other lists are true.

< T

Discussion

This is one of the fundamental operations (although it can be defined in terms of [choice] as above). The more common "if..then..else" construct -[ifte] adds a predicate function that is evaluated [nullary].


ccccons

   a b c d [...] ccccons
+[ifte] adds a predicate function that is evaluated [nullary].


ccccons

   a b c d [...] ccccons
 ---------------------------
        [a b c d ...]
 
@@ -224,7 +224,7 @@ Continuation-Passing Style. The dip combinator could "set aside" t item and replace it after running Q but that means that there is an "extra space" where the item resides while Q runs. One of the nice things about CPS is that the whole state is recorded in the stack and -pending expression (not counting modifications to the dictionary.)


dipd

combinator

Like [dip] but expects two items.

+pending expression (not counting modifications to the dictionary.)


dipd

combinator

Like [dip] but expects two items.

   ... y x [Q] . dipd
 -------------------------
            ... . Q y x
@@ -264,7 +264,7 @@ items removed off the top.

   a dup
 -----------
     a a
-

dupd

[dup] the second item down on the stack.

+

dupd

[dup] the second item down on the stack.

   a b dupd
 --------------
     a a b
@@ -303,7 +303,7 @@ them with a Boolean value.

   [a ...]
 --------------
       a
-

Definition


first_two

Replace a list with its first two items.

+

Definition


first_two

Replace a list with its first two items.

   [a b ...] first_two
 -------------------------
            a b
@@ -404,7 +404,7 @@ example, the [x] combinator can be defined as dup i.

[if] [then] [else] ifte --------------------------------------- [if] nullary [else] [then] branch -

Definition


ii

combinator

Take a quoted program from the stack and run it twice, first under the +

Definition


ii

combinator

Take a quoted program from the stack and run it twice, first under the top item, then again with the top item.

... a [Q] ii
 ------------------
@@ -515,12 +515,12 @@ parallelism combinator due to the "pure" nature of the language.

   [1 2 3 4] max
 -------------------
          4
-

min

Given a list find the minimum.

+

min

Given a list find the minimum.

Example

   [1 2 3 4] min
 -------------------
          1
-

mod

Return the remainder of a divided by b.

+

Definition


mod

Return the remainder of a divided by b.

   a b mod
 -------------
     (a%b)
@@ -552,7 +552,7 @@ stack, replacing them with a Boolean value.

[[F] nullary]

Definition

Discussion

Helper function for [or] and [and].


null

True if the item on the top of the stack is an empty list, false if it's a list but not empty, -and an error if it's not a list.

Definition


nullary

combinator

Run a quoted program without using any stack values and leave the first +and an error if it's not a list.

Definition


nullary

combinator

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

   ... [P] nullary
 ---------------------
@@ -614,11 +614,11 @@ the underlying [map] function is so implemented, of course.)

Definition

[+] [-] clop

pop

built-in

Pop the top item from the stack and discard it.

   a pop
 -----------
-

popd

[pop] the second item down on the stack.

+

popd

[pop] the second item down on the stack.

   a b popd
 --------------
       b
-

Definition


popdd

[pop] the third item on the stack.

+

Definition


popdd

[pop] the third item on the stack.

   a b c popdd
 -----------------
        b c
@@ -815,7 +815,7 @@ complement to the "destructive" pair [enstacken] and [disenstacken].

Definition

[_step0] x

Discussion

See the Recursion Combinators notebook.


step_zero

combinator

Like [step] but with 0 as the initial value.

+

Definition

Discussion


step_zero

combinator

Like [step] but with 0 as the initial value.

   [...] [F] step_zero
 -------------------------
      0 [...] [F] step
@@ -920,7 +920,7 @@ the list.  You cannot uncons an item from an empty list.

   [a ...] uncons
 --------------------
       a [...]
-

Definition

Discussion

This is the inverse of [cons].


unique

Given a list remove duplicate items.


unit

   a unit
+

Definition

Discussion

This is the inverse of [cons].


unique

Given a list remove duplicate items.


unit

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

Definition

[] cons

unquoted

combinator

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