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

18
LINES

< > BotCompany Repo | #1003282 // unparsePoem - poem pretty printer

JavaX fragment (include)

static S unparsePoem(L<E> poem) {
  new L<S> l;
  for (E e : poem) {
    S s;
    if (e.q != null)
      s = "Usr: " + trim(e.q);
    else if (e.a != null)
      s = "Bot: " + trim(e.a);
    else if (e.state != null)
      s = "[" + trim(e.state) + "]";
    else
      s = "?";
    if (e.comment != null)
      s += " // " + e.comment;
    l.add(s);
  }
  ret joinLines(l);
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1003282
Snippet name: unparsePoem - poem pretty printer
Eternal ID of this version: #1003282/1
Text MD5: 22ff83928b758411ef2d94c65d33162e
Author: stefan
Category: javax / talking robots
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-07-19 17:51:04
Source code size: 392 bytes / 18 lines
Pitched / IR pitched: No / No
Views / Downloads: 537 / 1271
Referenced in: [show references]