Many of the other scope functions simply "remix" the features of let() and apply() in slightly different combinations.

run(), for example:

  • Works like apply(), in that you use this to refer to the object

  • Works like let(), in that it returns the result of the lambda expression

Here, sometime is no longer a Calendar, but instead is a String, specifically the value that we get from calling toString() on the Calendar that we called run() on.

You can learn more about this in:
Run Edit