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

10
LINES

< > BotCompany Repo | #1012442 // ai_specReturn_giveMe

JavaX fragment (include)

1  
static S ai_specReturn_giveMe(S s) {
2  
  if (eqic(firstWord(s), "all")) {
3  
    S things = dropFirstWord("all", s);
4  
    ret "Have " + n(ai_countInstances(ai_allToA(s)), things);
5  
  }
6  
  new Matches m;
7  
  if (swic_trim(s, "a random ", m))
8  
    ret ai_randomInstance(a(m.rest()));
9  
  null;
10  
}

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: #1012442
Snippet name: ai_specReturn_giveMe
Eternal ID of this version: #1012442/4
Text MD5: 6713fc7b838cde41ad1457bd285940f7
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-12-03 20:15:44
Source code size: 289 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 401 / 426
Version history: 3 change(s)
Referenced in: [show references]