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

11
LINES

< > BotCompany Repo | #1022498 // gazelle_exactHistoryFromRule (chronological)

JavaX fragment (include)

// including actual input
static LS gazelle_exactHistoryFromRule(RuleEngine2.Rule rule) {
  new Matches m;
  new LS history;
  for (GRuleLine l : unnull(rule.insWithType))
    if (eq(l.type, "standard"))
      listPut(history, 0, l.text);
    else if (startsWith(l.type, "history-", m))
      listPut(history, parseIntOpt(m.rest())-1, l.text);
  ret reversed(history);
}

Author comment

Began life as a copy of #1022487

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1022498
Snippet name: gazelle_exactHistoryFromRule (chronological)
Eternal ID of this version: #1022498/3
Text MD5: aaa622076c73dd53e69155e405845717
Author: stefan
Category: javax / gazelle
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-03-19 11:07:54
Source code size: 380 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 150 / 186
Version history: 2 change(s)
Referenced in: [show references]