From 62fbed88aeeafaa3cb1aff48e68f30454929e41a Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Sun, 21 Mar 2021 10:22:10 -0400 Subject: Discuss the pure-functional nature of primitives in primitive.md --- docs/doc/primitive.html | 4 +++- docs/try.html | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/doc/primitive.html b/docs/doc/primitive.html index c5d89a0b..d9d696dc 100644 --- a/docs/doc/primitive.html +++ b/docs/doc/primitive.html @@ -5,7 +5,9 @@

BQN primitives

-

Primitives are functions and modifiers that are built into the language.

+

Primitives are functions and modifiers that are built into the language and written with individual glyphs. The role of a primitive when written always matches its type (but you can use its value in other roles by assigning it or various other methods).

+

Primitives have no side effects other than errors, and can't perform infinite computations, except in the case that the operand to a primitive modifier is a function that has side effects or never returns (primitive modifiers never perform computation when passed operands—they always bind the operands and act when called on arguments). Side effects here include both writing state such as variables or printed output, and reading any outside state, so that a function with no side effects always returns the same result if passed the same arguments. Trains and list notation have the same properties, so that tacit code written entirely with primitives, trains, and lists always describes finite, self-contained computations.

+

Recursion is the primary way to perform potentially infinite computations in BQN, and it can be packaged into control structures like While for ease of use. A given BQN implementation might also provide system values for "impure" tasks like file access or other I/O.

Functions

Functions that have significant differences from APL functions are marked with an asterisk. Links for these entries go to dedicated BQN documentation while other links go to the APL Wiki.

diff --git a/docs/try.html b/docs/try.html index d6617dbb..865fd36c 100644 --- a/docs/try.html +++ b/docs/try.html @@ -30,7 +30,7 @@

Notes: