foldrWithKey package:dependent-map

O(n). Post-order fold. The function will be applied from the lowest value to the highest.