Libraryless. Click here for Pure Java version (17787L/133K).
1 | !7 |
2 | |
3 | concept Entry { |
4 | S line, category, answer; |
5 | } |
6 | |
7 | module LineToCategory > DynCRUD<Entry> { |
8 | *() { super(Entry); } |
9 | |
10 | start { |
11 | onConceptsChangeAndNow(r { setModuleName("Line To Category (" + conceptCount() + ")") }); |
12 | } |
13 | |
14 | |
15 | // API |
16 | |
17 | void setAnswer(S line, S category, S answer) { |
18 | Entry e = uniq_sync(Entry, +line, +category); |
19 | if (e.answer != null && neq(e.answer, answer)) programLogStructure(litorderedmap( |
20 | action := "Overwritten", |
21 | +line, +category, oldAnswer := e.answer, +answer)); |
22 | cset(e, +answer); |
23 | } |
24 | } |
download show line numbers debug dex old transpilations
Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1020558 |
Snippet name: | Line To Category |
Eternal ID of this version: | #1020558/8 |
Text MD5: | 5941a6304a5f0e115ef5a5acbcf03acb |
Transpilation MD5: | 77341a8f6befa7acc9511fb1a908e98c |
Author: | stefan |
Category: | javax |
Type: | JavaX source code (Dynamic Module) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-12-27 02:00:06 |
Source code size: | 567 bytes / 24 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 279 / 749 |
Version history: | 7 change(s) |
Referenced in: | [show references] |