!759 // deterministic even static boolean safe(Native n) { if (n.match("[X] = snlTok(in S Y)")) yo { n.set("X", listToSNLTree(codeTokensOnly(snlTok(n.str())))); ret true; } if (n.match("the < opsplit < of < in X < is < Y")) yo { n.set("Y", snlSplitOps(n.get())); ret true; } if (n.match("true")) yo { ret true; } if (n.match("X = X")) yo { ret true; } if (n.match("isLeaf(in X)")) yo { ret n.get().isEmpty(); } if (n.match("X = head(in Y)")) yo { n.set("X", n.get().head); ret true; } if (n.match("X = args(in Y)")) yo { n.set("X", listToSNLTree(n.get().args)); ret true; } if (n.match("X = lisp(in Y)")) yo { L l = snlParseList(n.get()); //print("List found: " + structure(l)); if (l.isEmpty()) ret false; S head = unquote(l.get(0).raw()); L args = dropFirst(l); //print("Args: " + structure(args)); Lisp result = lisp(head, args); //print("Result: " + structure(result)); n.set("X", result); ret true; } ret false; }