Apparent slip and drag reduction for the flow over superhydrophobic and lubricant-impregnated surfaces