static Web web_keepOnlyRelationsStartingWith(Web web, S prefix) { for (WebRelation rel : values(web.relations)) { new L<Lisp> labels; for (Lisp l : rel.labels) if (swic(web.unparseLabel(l), prefix)) labels.add(l); if (l(labels) < l(rel.labels)) web_setLabels(rel, labels); } web_dropEmptyRelations(web); ret web; }
Began life as a copy of #1010300
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: | #1010303 |
Snippet name: | web_keepOnlyRelationsStartingWith [doesn't clone] |
Eternal ID of this version: | #1010303/3 |
Text MD5: | 15ea4541f2c4692f64d1f0c13ba7c11a |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-09-11 01:05:43 |
Source code size: | 365 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 459 / 506 |
Version history: | 2 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1010304 - web_unpackedRelationsStartingWith |