circ xor(a,b)->(!(a&b))&(a|b)
circ ha(a,b)->(a&b)+(xor(a,b))
circ fa(a,b,c)->(ha(ha(a,b),c)[h])+(ha(a,b)[t])|(ha(ha(a,b)[h],c)[t])
out fa(1,1,1)
Expected output is 11.
However, the interpreter popped out an error:
Traceback (most recent call last):
File "logicode.py", line 467, in <module>
Run(code)
File "logicode.py", line 424, in Run
result = statement[0](scope)
File "logicode.py", line 54, in <lambda>
return lambda scope: scope[result[0]]
File "logicode.py", line 180, in __getitem__
return self.parent[key]
KeyError: 'circ'
The circ parsing bit doesn't work with this code:
Expected output is 11.
However, the interpreter popped out an error: