qfoldl: foldl for quadtree