effect function
Implementation
EffectStop<Effect> effect(void Function() fn) {
final effect = _Effect(fn);
if (system.activeSub != null) {
system.link(effect, system.activeSub!);
} else if (system.activeScope != null) {
system.link(effect, system.activeScope!);
}
system.runEffect(effect);
return EffectStop(effect);
}