This paper presents a novel iterative learning control (ILC) scheme based on stretch and compression mapping for a robotic manipulator to learn its human partner's desired trajectory, which is a typical task in the field of human-robot interaction. The proposed scheme is used to reduce the interaction force between the robot and the human partner in repetitive learning process. Thus, the robot can track the human partner's repetitive trajectory with a small interaction force, leading to little control effort from the human. As the human is involved in the control loop, there are various uncertainties in the system, including variable iteration period in the task under study. The stretch and compression mapping is applied to this problem. In the simulation, the proposed scheme is implemented in the human-robot interaction scenario. Results confirm the effectiveness of the proposed scheme and also illustrate better performance of the proposed ILC compared with other ILC methods with variable periods.