a11
[clean-tests.git] / afp / a10 / a10.icl
index 77445a6..fabad8c 100644 (file)
@@ -77,4 +77,11 @@ eval (WhileContainerBelow _ action) s
                = eval (action :. whileContainerBelow action) s
        = pure s
 
-Start = moveToShip :. moveDown
+opt :: (Action a b) -> Action a b
+opt (WhileContainerBelow b a) = WhileContainerBelow b (opt a)
+opt (Wait bm :. b) = opt (bm.f2 b)
+opt (a :. Wait bm) = opt (bm.t2 a)
+opt (a :. b) = opt a :. opt b
+opt x = x
+
+Start = opt (moveToShip :. wait :. moveDown)