Skip to main content
Version: 0.4.0+

Object-Oriented Programming

Touying provides some convenient utility functions for object-oriented programming.


#let call-or-display(self, it) = {
if type(it) == function {
return it(self)
} else {
return it
}
}

Call or display as-is.


#let methods(self) = { .. }

Used to bind self to methods and return, very commonly used.