My bad, it looks like omitting the return behaves the same as in js, so my issue is caused by something else... I've assumed it was a problem with the recursive call and I can aviod dumping the whole thing.