!include once #1027630 // Msg cmodule NewEngineSpike > DynPrintLog { L msgs; start-thread { if (empty(msgs)) setField(msgs := mainCruddieLog()); print("Have " + nMessages(msgs)); pnlStruct(takeFirst(2, msgs)); L msgs2 = whereFieldIsTrue fromUser(msgs); new L props; for (Msg msg : takeFirst(5, msgs2)) print(addAndReturn(props, ll(msg, "was understood correctly"))); props.add(print(ll(get(msgs2, 5),"is a wrong recognition"))); O pat = ll("$x", "was Understood correctly"); for (O prop : props) { print(prop); print(" => " + mapToStringWithSize(deepZip(pat, prop))); } } Map shallowZip(O inputA, O inputB) { if (eqOrEqic_gen(inputA, inputB)) ret emptyMap(); if (inputA instanceof L && inputB instanceof L) ret antiFilterMap eqOrEqic_gen(zipTwoListsToMap_strict(inputA/L, inputB/L)); null; } Map deepZip(O inputA, O inputB) { Map map = shallowZip(inputA, inputB); if (map == null) null; Map map2 = similarEmptyMap(map); for (O a, b : map) { if (a instanceof L && b instanceof L) { Map subMap = deepZip(a, b); if (subMap == null) null; if (!putAllStrictly(map2, subMap)) null; } else if (!strictPut(map2, a, b)) null; } ret map2; } }