From 73e2ccdcb80f96d564b79cb69e54387b13605693 Mon Sep 17 00:00:00 2001 From: Niklas Kapelle Date: Mon, 5 Aug 2024 17:01:41 +0200 Subject: [PATCH] added turtle helper: combine --- src/lib/turtle/Helper.hx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/lib/turtle/Helper.hx b/src/lib/turtle/Helper.hx index 320c276..564102a 100644 --- a/src/lib/turtle/Helper.hx +++ b/src/lib/turtle/Helper.hx @@ -14,4 +14,16 @@ class Helper { return Success(null); } + + public static function combine(steps:ArrayOutcome>):Outcome { + for (step in steps) { + var res = step(); + + if (!res.isSuccess()) { + return res; + } + } + + return Success(null); + } }