def gather
import minebender-game@1.0.0.0/solver.bend as Solverimport Base
import minebender-game@1.0.0.0/types.bend as T
443# The todos of ts for the cells qs, in the order of qs.
444def gather(qs: List<&2, T.Pos>, +ts: List<&2, Todo>) -> List<&2, Todo>:
445 match qs:
446 case Nil{}:
447 Nil{}
448 case q <> t:
449 List.append(&2, Todo, with_c(ts, q), gather(t, ts))