Add binary functions.
This commit is contained in:
@@ -425,6 +425,16 @@ def parse(stack):
|
||||
return expression, stack
|
||||
|
||||
|
||||
@inscribe
|
||||
@SimpleFunctionWrapper
|
||||
def infer_(stack):
|
||||
'''Attempt to infer the stack effect of a Joy expression.'''
|
||||
E, stack = stack
|
||||
effects = infer_expression(E)
|
||||
e = list_to_stack([(fi, (fo, ())) for fi, fo in effects])
|
||||
return e, stack
|
||||
|
||||
|
||||
@inscribe
|
||||
@sec2
|
||||
@SimpleFunctionWrapper
|
||||
|
||||
Reference in New Issue
Block a user