Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

One way to look at the currying process is to say that the returned lambda of make-addX "captures" the value of "x" at the moment that it is created.   This capturing process will become very important later on when we have more complicated algorithms where we will want to clearly delineate parameters that are variant in one part of the code but invariant in another.   The use of lambdas and their ability to curry variables will become one of our most powerful tools as the semester progresses!

 All of this is part of the notion of a function's "closure", a topic we will discuss more formally very soon,

...