$periodic static method
Creates a new $Stream that runs periodically
Implementation
static $Value? $periodic(
Runtime runtime, $Value? target, List<$Value?> args) {
final computation = args[1]?.$value as EvalCallable?;
return $Stream.wrap(Stream.periodic(
args[0]!.$value as Duration,
computation == null
? null
: (i) => runtime.wrap(computation.call(runtime, null, [$int(i)]))));
}