Files
exercises-in-programming-style/05-kick-your-teammate-forward
Bruce Adams 5749c2c50f Enhance testing: run all executables
Add a #! line at the beginning of each of the existing Python programs
and change these files to be executable. This sets the stage for having
the test script blindly run anything that is executable, adding support
for testing many programming languages.
2013-09-24 22:09:30 -04:00
..
2013-09-22 12:46:20 -07:00
2013-09-24 22:09:30 -04:00

Style #5

Variation of style #4, with the following additional constraints:

  • Each function takes an additional parameter, usually the last, which is another function
  • That function parameter is applied at the end of the current function
  • That function parameter is given as input what would be the output of the current function
  • Larger problem is solved as a pipeline of functions, but where the next function to be applied is given as parameter to the current function

Possible names:

  • Kick your teammate forward!
  • Continuation-passing style
  • Crochet loop