added turtle helper: combine

This commit is contained in:
Niklas Kapelle 2024-08-05 17:01:41 +02:00
parent b05dae958d
commit 73e2ccdcb8
Signed by: niklas
GPG Key ID: 4EB651B36D841D16

View File

@ -14,4 +14,16 @@ class Helper {
return Success(null); return Success(null);
} }
public static function combine(steps:Array<Void->Outcome<Noise, String>>):Outcome<Noise, String> {
for (step in steps) {
var res = step();
if (!res.isSuccess()) {
return res;
}
}
return Success(null);
}
} }