This commit is contained in:
Simon Forman 2020-11-23 08:59:20 -08:00
commit 5a91f04f1a
1 changed files with 7 additions and 0 deletions

View File

@ -33,10 +33,17 @@ from .utils.stack import stack_to_string
def joy(stack, expression, dictionary, viewer=None):
'''Evaluate a Joy expression on a stack.
<<<<<<< working copy
This function iterates through a sequence of terms which are either
literals (strings, numbers, sequences of terms) or function symbols.
Literals are put onto the stack and functions are looked up in the
dictionary and executed.
=======
This function iterates through a sequence of terms which are either
literals (strings, numbers, sequences of terms) or function symbols.
Literals are put onto the stack and functions are looked up in the
disctionary and executed.
>>>>>>> merge rev
The viewer is a function that is called with the stack and expression
on every iteration, its return value is ignored.