trueagi-io / metta-wam

A Hyperon MeTTa Interpreter/Transpilier that targets the Warren Abstract Machine
8 stars 11 forks source link

Implement 'py-list' function in interpreter #48

Open TeamSPoon opened 2 months ago

TeamSPoon commented 2 months ago

We need to implement the 'py-list' function in the interpreter as specified in stdlib.py. A test file should also be created to ensure the function works correctly. The symbol for this function was found in the following files: stdlib.py.

TeamSPoon commented 1 month ago

a test found in python was

self.assertEqual(metta.run('!(py-list (1 2 (4.5 3)))'), [[ValueAtom( [1,2,[4.5,3]] )]])

A wayh to construcct it in MeTTa would be

!(assertEqual (py-list (1 2 (4.5 3))) (py-eval "[1,2,[4.5,3]]"))