added turtle helper: combine
This commit is contained in:
parent
b05dae958d
commit
73e2ccdcb8
@ -14,4 +14,16 @@ class Helper {
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user