AnyExtension<T> extension

An extension which adds utilities for values of all types.

on
  • T

Methods

also(void f(T it)) → T
Returns this value after calling f with it.
filter(bool f(T it)) → T?
Returns this value if the predicate f returns true, otherwise returns null.
let<R>(R f(T it)) → R
Returns the result of giving this value to f.