!7 cprint { transient Set requestedFunctions; transient Set have; transient Set newFunctions; transient Set imported; transient Set toImport; transient S loadableUtilsSnippetID = #1030952; transient S includeSnippetID = #1030953; start-thread { requestedFunctions = asSet(startingWithIC_dropAndTrim("Compiling function:", mapLines(loadSnippet(#1030949), s -> dropLeadingAngleBracketStuff(s))); print(n2(requestedFunctions, "requested function")); have = asSet(lmap tok_lastIdentifier(jextractAll("please include function .", loadSnippet(loadableUtilsSnippetID)))); print("Have " + n2(have, "function")); newFunctions = setMinusSet(requestedFunctions, have); print(n2(newFunctions, "new function")); imported = asSet(lmap tok_lastIdentifier(jextractAll("import static loadableUtils.utils.;", loadSnippet(includeSnippetID)))); print(n2(imported, "imported function")); toImport = setMinusSet(have, imported); print(n2(toImport) + " to import"); } void appendThem { if (empty(newFunctions)) ret with print("Nothing to do"); S text = loadSnippet(loadableUtilsSnippetID); text += "\n\n" + mapToLines(newFunctions, f -> "please include function " + f + "."); editSnippet(loadableUtilsSnippetID, text); } void appendImported { if (empty(toImport)) ret with print("Nothing to do"); S text = loadSnippet(includeSnippetID); text += "\n\n" + mapToLines(toImport, f -> "import static loadableUtils.utils." + f + ";"); editSnippet(includeSnippetID, text); } }