The capacitor acts as a differentiator - current is proportional to the area under the input's voltage curve. The derivative of a square wave is a triangular waveform. The resistor is a current-sense, so voltage is roughly proportional to the derivative of the input's voltage.