* Factor foldr-related operations into foldr.ls