mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-06 16:40:32 +00:00
11 lines
183 B
Dart
11 lines
183 B
Dart
extension ApplyExtension<T> on T {
|
|
T apply(void Function(T) fn) {
|
|
fn(this);
|
|
return this;
|
|
}
|
|
}
|
|
|
|
extension LetExtension<T> on T {
|
|
R let<R>(R Function(T) fn) => fn(this);
|
|
}
|