beyondgrader.com Logo
DemoBrowseAboutTeamLogin

Subtractor Function Factory

ben@rigeltechnical.com // 1.0

Write a function named make_subtractor that takes one int, the minuend. It should return another function that takes one int, the subtrahend, and returns the result of subtracting the minuend from the subtrahend.

Note that calling make_subtractor again must not change the behavior of functions it previously returned.