Libraryless. Click here for Pure Java version (18528L/133K).
!7 sclass Entry { S text; } module ELERewrites > DynObjectTable<Entry> { transient S input; transient Set<S> rewrites = ciSet(); start { ele_onInput(lambda1 setInput); } // API void setInput(S input) enter { dm_q(r { if (setField(+input)) clearRewrites(); }); } void clearRewrites() { rewrites.clear(); clear(); } void addRewrite(S input, S text) q { if (eq(input, ELERewrites.this.input) && rewrites.add(text)) add(nu Entry(+text)); } }
Began life as a copy of #1026531
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1026651 |
Snippet name: | ELE: Rewrites |
Eternal ID of this version: | #1026651/5 |
Text MD5: | 986333175583ecb88bb2995649d96525 |
Transpilation MD5: | 2f3c8f07a2346e97f4385bff59a61967 |
Author: | stefan |
Category: | javax / electric logic engine |
Type: | JavaX source code (Dynamic Module) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-01-19 20:45:40 |
Source code size: | 546 bytes / 31 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 194 / 5092 |
Version history: | 4 change(s) |
Referenced in: | [show references] |