Rebuild docs
This commit is contained in:
@@ -4,8 +4,8 @@ Replacing Functions in the Dictionary
|
||||
For now, there is no way to define new functions from within the Joy
|
||||
language. All functions (and the interpreter) all accept and return a
|
||||
dictionary parameter (in addition to the stack and expression) so that
|
||||
we can implement e.g. a function that adds new functions to the
|
||||
dictionary. However, there's no function that does that. Adding a new
|
||||
we can implement e.g. a function that adds new functions to the
|
||||
dictionary. However, there’s no function that does that. Adding a new
|
||||
function to the dictionary is a meta-interpreter action, you have to do
|
||||
it in Python, not Joy.
|
||||
|
||||
@@ -74,8 +74,8 @@ Both ``sum`` and ``size`` each convert a sequence to a single value.
|
||||
|
||||
::
|
||||
|
||||
sum == 0 swap [+] step
|
||||
size == 0 swap [pop ++] step
|
||||
sum == 0 swap [+] step
|
||||
size == 0 swap [pop ++] step
|
||||
|
||||
An efficient ``sum`` function is already in the library. But for
|
||||
``size`` we can use a “compiled” version hand-written in Python to speed
|
||||
|
||||
Reference in New Issue
Block a user