fixed a leak in func_compose(), added a test, almost have a working implementation of ifte