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

11
LINES

< > BotCompany Repo | #1008209 // followBackwardRelation

JavaX fragment (include)

static Set<Lisp> followBackwardRelation(S relation, S argument) {
  ret followBackwardRelation(relation, lisp(argument));
}

static Set<Lisp> followBackwardRelation(S relation, Lisp argument) {
  new HashSet<Lisp> out;
  for (Lisp l : lispTruthByHead(relation))
    if (eq(l.get(1), argument))
      out.add(l.get(0));
  ret out;
}

Author comment

Began life as a copy of #1007941

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: #1008209
Snippet name: followBackwardRelation
Eternal ID of this version: #1008209/1
Text MD5: 765d031be1d1a31092a9e7a3856c8951
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-04-30 01:54:47
Source code size: 341 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 393 / 401
Referenced in: [show references]