run<R> method

R run<R>(
  1. R block(
    1. T self
    )
)

Executes block with value as 'this' context and returns result Usage: user.run((self) => self.name.toUpperCase())

Implementation

R run<R>(R Function(T self) block) {
  return block(this);
}