Uses 911K of libraries. Click here for Pure Java version (1587L/9K).
1 | !7 |
2 | |
3 | compact module CountThings > DynPrintLog { |
4 | start { |
5 | dm_onTopInput(voidfunc(fS s) { reactTo(s) }); |
6 | } |
7 | |
8 | void reactTo(fS s) enter { |
9 | switch to q(); |
10 | new Matches m; |
11 | if "how many * are there" { |
12 | S singular = print("singular", singular($1)); |
13 | int n = l(dm_getReverseDefinitions(a(singular))); |
14 | if (n != 0) dm_say(n); |
15 | } |
16 | } |
17 | } |
download show line numbers debug dex old transpilations
Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1020764 |
Snippet name: | Count things by definition |
Eternal ID of this version: | #1020764/5 |
Text MD5: | bf9614405aa2044c11d282857ddc3039 |
Transpilation MD5: | 605d861a2822870ae35d6c8c953a2e81 |
Author: | stefan |
Category: | javax / stefan's os / a.i. |
Type: | JavaX source code (Dynamic Module) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-01-01 22:49:18 |
Source code size: | 377 bytes / 17 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 341 / 1448 |
Version history: | 4 change(s) |
Referenced in: | [show references] |