Object-Oriented Programming
#
Objects as closuresIt can be succinct to implement an object using closures. Here is an excellent example from Ross and Robert (1996), p.304:
#
R6 style of declarationThe sketch package supports object declaration using the R6 OOP syntax. Here is an example: