Joy Interpreter¶
joy.joy¶
This module implements an interpreter for a dialect of Joy that attempts to stay very close to the spirit of Joy but does not precisely match the behaviour of the original version(s) written in C.
-
joy.joy.joy(stack, expression, dictionary, viewer=None)[source]¶ Evaluate the Joy expression on the stack.
The basic joy() function is quite straightforward. It iterates through a sequence of terms which are either literals (strings, numbers, sequences) or functions. Literals are put onto the stack and functions are executed.
Parameters: - stack (quote) – The stack.
- expression (quote) – The expression to evaluate.
- dictionary (dict) – A dict mapping names to Joy functions.
- viewer (function) – Optional viewer function.