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

17
LINES

< > BotCompany Repo | #1014654 // Suggester Module 2 (LIVE)

JavaX module [tags: use-pretranspiled]

Download Jar. Libraryless. Click here for Pure Java version (8380L/58K/197K).

!7

static L<Pair<S, Runnable>> lastList;

// text + action
static L<Pair<S, Runnable>> suggest() {
  L<Pair<S, Runnable>> l = new L; // Need Runnables because we export
  
  for (S text, function : mechMapCI("Suggester entries")) {
    fS f = function;
    addPair(l, text, r { callAndMake(f) });
  }
  
  // Return list unless same as last time
  if (eq(firstOfPairs(lastList), firstOfPairs(l))) null;
  ret lastList = l;
}

Author comment

Began life as a copy of #1014649

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1014654
Snippet name: Suggester Module 2 (LIVE)
Eternal ID of this version: #1014654/2
Text MD5: dd91e44fa7e7d9646121ae2e466563a5
Transpilation MD5: 040ec909cdf2fd1ae542e474fe1aa258
Author: stefan
Category: javax / a.i. / gui
Type: JavaX module
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-04-27 17:31:12
Source code size: 441 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 269 / 13447
Version history: 1 change(s)
Referenced in: [show references]