MCPcopy Create free account
hub / github.com/LHRLAB/ChatKBQA / lisp_to_lambda

Function lisp_to_lambda

executor/logic_form_util.py:738–745  ·  view source on GitHub ↗
(expressions: Union[List[str], str])

Source from the content-addressed store, hash-verified

736
737# I don't think this is ever gonna be implemented
738def lisp_to_lambda(expressions: Union[List[str], str]): # from lisp-grammar formula to lambda DCS
739 # expressions = lisp_to_nested_expression(source_formula)
740 if not isinstance(expressions, list):
741 return expressions
742 if expressions[0] == 'AND':
743 return lisp_to_lambda(expressions[1]) + ' AND ' + lisp_to_lambda(expressions[2])
744 elif expressions[0] == 'JOIN':
745 return lisp_to_lambda(expressions[1]) + '*' + lisp_to_lambda(expressions[2])
746
747
748if __name__=='__main__':

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected