Updated f.each method updated version