1 | // Learning |
2 | |
3 | [ |
4 | if [User < says < C < is < a < Language] |
5 | and [i < don't < know < C] |
6 | memorize [User < said < C < is < a < Language] |
7 | say [ |
8 | [ok < C < is < a < Language] |
9 | [i < will < remember < that] |
10 | ] |
11 | ] |
12 | |
13 | // Querying |
14 | |
15 | [ |
16 | if [User < says < what < is < X] |
17 | and [* < said < X < is < a < Language] |
18 | say [X < is < a < Language] |
19 | ] |
20 | |
21 | [ |
22 | if [User < says < is < C < a < Language] |
23 | and [* < said < C < is < a < Language] |
24 | say [yes] |
25 | ] |
26 | |
27 | [ // fallback |
28 | if [User < says < is < C < a < Language] |
29 | say [i < don't < know] |
30 | ] |
31 | |
32 | // Verifying |
33 | |
34 | [ |
35 | if [User < says < C < is < a < A] |
36 | and [* < said < C < is < a < A] |
37 | say [yes < i < know] |
38 | ] |
39 | |
40 | // Adding another one |
41 | |
42 | [ |
43 | if [User < says < C < is < a < B] |
44 | and [* < said < C < is < a < A] |
45 | memorize [User < said < C < is < a < B] |
46 | say [ |
47 | [oh < i < thought < C < was < a < A] |
48 | [i < will < remember < that < it [= C] < is < also < a < B] |
49 | ] |
50 | ] |
Began life as a copy of #1002732
Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1002745 |
Snippet name: | C is a Language |
Eternal ID of this version: | #1002745/1 |
Text MD5: | 1d78116e2c7f7f4d87c5fd0d0c960897 |
Author: | stefan |
Category: | snl logic |
Type: | Document |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-02-20 04:59:37 |
Source code size: | 977 bytes / 50 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 614 / 636 |
Referenced in: | [show references] |