Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

83
LINES

< > BotCompany Repo | #3000335 // Answer for stefanreich (>> rewrite "what is the time?" with "drop question mark from user input")

New Tinybrain snippet

1  
2  
[user says [what is the time]]
3  
```
4  
```
5  
Starting on goal: user says _2
6  
Goal arity 3: user says _2
7  
Got clause: user says [what is the time ?]
8  
  Clause unifies to: user says [what is the time ?]
9  
  gdash: _1 = drop question mark ([what is the time ?])
10  
Goal arity 6: _1 = drop question mark ([what is the time ?])
11  
 Got clause: _34 = drop question mark (_35)
12  
   Clause unifies to: _1 = drop question mark ([what is the time ?])
13  
   gdash: _36 = tocons ([what is the time ?])
14  
 Goal arity 4: _36 = tocons ([what is the time ?])
15  
  Got clause: _53 = tocons (_54)
16  
    Clause unifies to: _36 = tocons ([what is the time ?])
17  
   Clause is native.
18  
    gdash: endswithword_c [cons what [cons is [cons the [cons time [cons ? end]]]]] ?
19  
  Goal arity 3: endswithword_c [cons what [cons is [cons the [cons time [cons ? end]]]]] ?
20  
   Got clause: endswithword_c [cons _58 _59] _60
21  
     Clause unifies to: endswithword_c [cons what [cons is [cons the [cons time [cons ? end]]]]] ?
22  
     gdash: endswithword_c [cons is [cons the [cons time [cons ? end]]]] ?
23  
   Goal arity 3: endswithword_c [cons is [cons the [cons time [cons ? end]]]] ?
24  
    Got clause: endswithword_c [cons _64 _65] _66
25  
      Clause unifies to: endswithword_c [cons is [cons the [cons time [cons ? end]]]] ?
26  
      gdash: endswithword_c [cons the [cons time [cons ? end]]] ?
27  
    Goal arity 3: endswithword_c [cons the [cons time [cons ? end]]] ?
28  
     Got clause: endswithword_c [cons _70 _71] _72
29  
       Clause unifies to: endswithword_c [cons the [cons time [cons ? end]]] ?
30  
       gdash: endswithword_c [cons time [cons ? end]] ?
31  
     Goal arity 3: endswithword_c [cons time [cons ? end]] ?
32  
      Got clause: endswithword_c [cons _76 _77] _78
33  
        Clause unifies to: endswithword_c [cons time [cons ? end]] ?
34  
        gdash: endswithword_c [cons ? end] ?
35  
      Goal arity 3: endswithword_c [cons ? end] ?
36  
       Got clause: endswithword_c [cons _81 end] _81
37  
         Clause unifies to: endswithword_c [cons ? end] ?
38  
         gdash: _37 = droplast_c [cons what [cons is [cons the [cons time [cons ? end]]]]]
39  
       Goal arity 4: _37 = droplast_c [cons what [cons is [cons the [cons time [cons ? end]]]]]
40  
        Got clause: [cons _113 _114] = droplast_c [cons _113 _115]
41  
          Clause unifies to: [cons what _114] = droplast_c [cons what [cons is [cons the [cons time [cons ? end]]]]]
42  
          gdash: _114 = droplast_c [cons is [cons the [cons time [cons ? end]]]]
43  
        Goal arity 4: _114 = droplast_c [cons is [cons the [cons time [cons ? end]]]]
44  
         Got clause: [cons _147 _148] = droplast_c [cons _147 _149]
45  
           Clause unifies to: [cons is _148] = droplast_c [cons is [cons the [cons time [cons ? end]]]]
46  
           gdash: _148 = droplast_c [cons the [cons time [cons ? end]]]
47  
         Goal arity 4: _148 = droplast_c [cons the [cons time [cons ? end]]]
48  
          Got clause: [cons _181 _182] = droplast_c [cons _181 _183]
49  
            Clause unifies to: [cons the _182] = droplast_c [cons the [cons time [cons ? end]]]
50  
            gdash: _182 = droplast_c [cons time [cons ? end]]
51  
          Goal arity 4: _182 = droplast_c [cons time [cons ? end]]
52  
           Got clause: [cons _215 _216] = droplast_c [cons _215 _217]
53  
             Clause unifies to: [cons time _216] = droplast_c [cons time [cons ? end]]
54  
             gdash: _216 = droplast_c [cons ? end]
55  
           Goal arity 4: _216 = droplast_c [cons ? end]
56  
            Got clause: end = droplast_c [cons _248 end]
57  
              Clause unifies to: end = droplast_c [cons ? end]
58  
              gdash: _1 = fromcons ([cons what [cons is [cons the [cons time end]]]])
59  
            Goal arity 4: _1 = fromcons ([cons what [cons is [cons the [cons time end]]]])
60  
             Got clause: _266 = fromcons (_267)
61  
               Clause unifies to: _1 = fromcons ([cons what [cons is [cons the [cons time end]]]])
62  
              Clause is native.
63  
               gdash: -
64  
SUCCESS!
65  
Found new statement: "[]"(user, says, "[]"(what, is, the, time))
66  
            Got clause: [cons _340 _341] = droplast_c [cons _340 _342]
67  
              Clause unifies to: [cons ? _341] = droplast_c [cons ? end]
68  
              gdash: _341 = droplast_c end
69  
            Goal arity 4: _341 = droplast_c end
70  
             Got clause: end = droplast_c end
71  
               Clause unifies to: end = droplast_c end
72  
               gdash: _1 = fromcons ([cons what [cons is [cons the [cons time [cons ? end]]]]])
73  
             Goal arity 4: _1 = fromcons ([cons what [cons is [cons the [cons time [cons ? end]]]]])
74  
              Got clause: _390 = fromcons (_391)
75  
                Clause unifies to: _1 = fromcons ([cons what [cons is [cons the [cons time [cons ? end]]]]])
76  
               Clause is native.
77  
                gdash: -
78  
SUCCESS!
79  
Statement exists, skipping: "[]"(user, says, "[]"(what, is, the, time, "?"))
80  
       Got clause: endswithword_c [cons _810 _811] _812
81  
         Clause unifies to: endswithword_c [cons ? end] ?
82  
         gdash: endswithword_c end ?
83  
       Goal arity 3: endswithword_c end ?

download  show line numbers   

Snippet is not live.

Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #3000335
Snippet name: Answer for stefanreich (>> rewrite "what is the time?" with "drop question mark from user input")
Eternal ID of this version: #3000335/1
Text MD5: 8791a4f2c883960fd306114907fbfa9f
Author: someone
Category:
Type: New Tinybrain snippet
Gummipassword: eleutheria-for-user
Uploaded from IP: 69.10.46.185
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-03-14 01:21:30
Source code size: 4980 bytes / 83 lines
Pitched / IR pitched: No / No
Views / Downloads: 417 / 106
Referenced in: [show references]