use generate_reducedim_codes for foldl