Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

22
LINES

< > BotCompany Repo | #1014385 // Verify theories (OK)

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Libraryless. Click here for Pure Java version (6521L/42K).

!7

p {
  new Matches m;
  S base = "heise.de 2018/04/20 (raw)";
  for (S list : mechListsPlusNumber(barCombine(base, "Similar lines"))) {
    L<S> l = mechList(list);
    for (S s : mechList(barCombine(list, "Theories"))) {
      print_noNewLine("Theory " + s + ": ");
      if "all lines start with *"
        print(allStartWithIC(l, $1) ? "VERIFIED" : "failed");
      else if "all lines end with *"
        print(allEndWithIC(l, $1) ? "VERIFIED" : "failed");
      else if "All lines contain the characters * (possibly not in order)"
        print(allContainAllCharsIC(l, $1) ? "VERIFIED" : "failed");
      else if "All lines contain the characters * exactly once (possibly not in order)"
        print(isSuperSet(charactersAppearingExactlyOnceInEachString(allToUpper(l)), charsAsList($1)) ? "VERIFIED" : "failed");
      else
        print("Uninterpretable theory");
    }
  }
}

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1014385
Snippet name: Verify theories (OK)
Eternal ID of this version: #1014385/11
Text MD5: c1fa16f0a7e17ebd9e73906bb4dc08e2
Transpilation MD5: c5a181b5ba956c9d6f197322559003cb
Author: stefan
Category: javax / a.i.
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-04-21 14:11:47
Source code size: 905 bytes / 22 lines
Pitched / IR pitched: No / No
Views / Downloads: 526 / 1127
Version history: 10 change(s)
Referenced in: [show references]