Implemented apply and cut operation according to the logic found on the python implementation. Fixed the type definition mistake on the disconnectSubTreeHandler function.
Added findAndRemove function for list of trees and a replaceChildren function.
Added test cases for the apply and cut operation.
Removed import from expression helper module in the utilities metta file due to naming conflict of similar function in the tree helper functions which led to unwanted non determinism.
It's better to view the PR starting from the list-helpers.metta file and then go to the RTEHelpers.metta file.
disconnectSubTreeHandler
function.findAndRemove
function for list of trees and areplaceChildren
function.It's better to view the PR starting from the
list-helpers.metta
file and then go to theRTEHelpers.metta
file.