Moved foldLeft with terminationCondition up to Transformable