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

72
LINES

< > BotCompany Repo | #3000228 // Answer for stefanreich (>> log)

New Tinybrain snippet

clause(Lisp): "[]"(if, "[]"($x, and, not, "()"($y)), then, "[]"($x, xor, $y), if, "[]"(not, "()"($x), and, $y), then, "[]"($x, xor, $y)) => [l("if *", l("[]", "$x", "and", "not", l("()", "$y"))), l("then *", l("[]", "$x", "xor", "$y")), l("if *", l("[]", "not", l("()", "$x"), "and", "$y")), l("then *", l("[]", "$x", "xor", "$y"))]
clause(Lisp): "[]"("[]"(not, "()"(true)), should, be, false) => null
clause(Lisp): "[]"(mrshutco, is, a, human) => [l("mrshutco *", "is"), l("a *", "human")]
clause(Lisp): "[]"("[]"(not, "()"(false)), should, be, true) => null
clause(Lisp): "[]"(if, $x, and, "!", and, false, then, "[]"(not, "()"($x))) => [l("if *", "$x"), l("and *", "!"), l("and *", "false"), l("then *", l("[]", "not", l("()", "$x")))]
clause(Lisp): "[]"(not, "()"($x)) => [l("not *", l("()", "$x"))]
clause(Lisp): "[]"(if, $a, and, $b, then, "[]"($a, and, $b)) => [l("if *", "$a"), l("and *", "$b"), l("then *", l("[]", "$a", "and", "$b"))]
clause(Lisp): "[]"(if, "[]"($c, "=", tocons, "()"($list)), and, "[]"($e, "=", iter, $c), then, "[]"($e, is, in, list, $list)) => [l("if *", l("[]", "$c", "=", "tocons", l("()", "$list"))), l("and *", l("[]", "$e", "=", "iter", "$c")), l("then *", l("[]", "$e", "is", "in", "list", "$list"))]
clause(Lisp): "[]"(lasagna, is, tasty) => null
clause(Lisp): "[]"(if, "[]"($c, "=", tocons, "()"($list)), and, "[]"($e, "=", iter, $c), then, "[]"($e, in, $c)) => [l("if *", l("[]", "$c", "=", "tocons", l("()", "$list"))), l("and *", l("[]", "$e", "=", "iter", "$c")), l("then *", l("[]", "$e", "in", "$c"))]
clause(Lisp): "[]"(if, $a, then, "[]"($a, or, $b)) => [l("if *", "$a"), l("then *", l("[]", "$a", "or", "$b"))]
clause(Lisp): "[]"(if, $b, then, "[]"($a, or, $b)) => [l("if *", "$b"), l("then *", l("[]", "$a", "or", "$b"))]
clause(Lisp): "[]"($head, "=", iter, "[]"(cons, $head, $tail)) => null
clause(Lisp): "[]"(if, "[]"($x, "=", iter, $tail), then, "[]"($x, "=", iter, "[]"(cons, $head, $tail))) => [l("if *", l("[]", "$x", "=", "iter", "$tail")), l("then *", l("[]", "$x", "=", "iter", l("[]", "cons", "$head", "$tail")))]
clause(Lisp): "[]"(if, $x, then, "[]"(verify, "[]"($x, should, be, true))) => [l("if *", "$x"), l("then *", l("[]", "verify", l("[]", "$x", "should", "be", "true")))]
clause(Lisp): "[]"(if, "[]"($a, "=", intmul, "()"("[]"($b, ",", $c))), then, "[]"($a, "=", smartmul, "()"("[]"($b, ",", $c)))) => [l("if *", l("[]", "$a", "=", "intmul", l("()", l("[]", "$b", ",", "$c")))), l("then *", l("[]", "$a", "=", "smartmul", l("()", l("[]", "$b", ",", "$c"))))]
clause(Lisp): "[]"(if, "[]"($b, "=", intdiv, "()"("[]"($a, ",", $c))), then, "[]"($a, "=", smartmul, "()"("[]"($b, ",", $c)))) => [l("if *", l("[]", "$b", "=", "intdiv", l("()", l("[]", "$a", ",", "$c")))), l("then *", l("[]", "$a", "=", "smartmul", l("()", l("[]", "$b", ",", "$c"))))]
clause(Lisp): "[]"(if, "[]"($c, "=", intdiv, "()"("[]"($a, ",", $b))), then, "[]"($a, "=", smartmul, "()"("[]"($b, ",", $c)))) => [l("if *", l("[]", "$c", "=", "intdiv", l("()", l("[]", "$a", ",", "$b")))), l("then *", l("[]", "$a", "=", "smartmul", l("()", l("[]", "$b", ",", "$c"))))]
clause(Lisp): "[]"(if, "[]"(not, "()"($x)), then, "[]"(verify, "[]"($x, should, be, false))) => [l("if *", l("[]", "not", l("()", "$x"))), l("then *", l("[]", "verify", l("[]", "$x", "should", "be", "false")))]
clause(Lisp): "[]"(if, $x, then, "()"($x)) => [l("if *", "$x"), l("then *", l("()", "$x"))]
clause(Lisp): "[]"("\"and\"", is, a, fill, word) => null
clause(Lisp): "[]"("\",\"", is, a, fill, word) => null
clause(Lisp): "[]"(feet, is, the, plural, of, foot) => [l("feet *", "is"), l("the *", "plural"), l("of *", "foot")]
clause(Lisp): "[]"(bits, is, the, plural, of, bit) => [l("bits *", "is"), l("the *", "plural"), l("of *", "bit")]
Starting on goal: Prolog$Goal(car=l("[]", "not", l("()", l("[]", "true", "or", "true"))))
Goal arity 2: "[]"(not, "()"("[]"(true, or, true)))
  Goal: "[]"(not, "()"("[]"(true, or, true))). Trying clause: "[]"(not, "()"(_1)) :- _1; "!"; false
 Clause unifies to: "[]"(not, "()"("[]"(true, or, true))) :- "[]"(true, or, true); "!"; false
gdash: "[]"(true, or, true); "!"("1"); false
Goal arity 3: "[]"(true, or, true)
New goal: "[]"(true, or, true); "!"("1"); false
   Goal: "[]"(true, or, true); "!"("1"); false. Trying clause: "[]"(_2, xor, _3) :- "[]"(_2, and, not, "()"(_3)); "[]"(_2, xor, _3); "[]"(not, "()"(_2), and, _3)
 No match for clause.
   Goal: "[]"(true, or, true); "!"("1"); false. Trying clause: "[]"(_4, and, _5) :- _4; _5
 No match for clause.
   Goal: "[]"(true, or, true); "!"("1"); false. Trying clause: "[]"(lasagna, is, tasty)
 No match for clause.
   Goal: "[]"(true, or, true); "!"("1"); false. Trying clause: "[]"(_6, in, _7) :- "[]"(_7, "=", tocons, "()"(_8)); "[]"(_6, "=", iter, _7)
 No match for clause.
   Goal: "[]"(true, or, true); "!"("1"); false. Trying clause: "[]"(_9, or, _10) :- _9
  Clause unifies to: "[]"(true, or, true) :- true
 gdash: true; "!"("1"); false
Goal arity 0: true
 New goal: true; "!"("1"); false
    Goal: true; "!"("1"); false. Trying clause: true
   Clause unifies to: true
  gdash: "!"("1"); false
Goal arity 1: "!"("1")
  New goal: "!"("1"); false
cut -1. Prolog$Goal(car=l("!", "1"), cdr=Prolog$Goal(car=l("false")))
Goal arity 0: false
      Goal: false. Trying clause: true
    No match for clause.
      Goal: false. Trying clause: nativeTest2 :- native
    No match for clause.
      Goal: false. Trying clause: nativeFail :- native
    No match for clause.
cut 0. Prolog$Goal(car=l("!", "1"), cdr=Prolog$Goal(car=l("false")))
back to cut point 1
cut: dropping Prolog$Goal(car=l("!", "1"), cdr=Prolog$Goal(car=l("false")))
cut: dropping Prolog$Goal(car=Prolog$Var(id=9L, instance=l("true")), cdr=Prolog$Goal(car=l("!", "1"), cdr=Prolog$Goal(car=l("false"))))
cut: dropping Prolog$Goal(car=Prolog$Var(id=1L, instance=l("[]", "true", "or", "true")), cdr=Prolog$Goal(car=l("!", "1"), cdr=Prolog$Goal(car=l("false"))))
  Goal: "[]"(not, "()"("[]"(true, or, true))). Trying clause: "[]"(not, "()"(_11))
 Clause unifies to: "[]"(not, "()"("[]"(true, or, true)))
gdash: null
SUCCESS!
  Goal: "[]"(not, "()"("[]"(true, or, true))). Trying clause: "[]"(verify, "[]"(_12, should, be, true)) :- _12
No match for clause.
  Goal: "[]"(not, "()"("[]"(true, or, true))). Trying clause: "[]"(verify, "[]"(_13, should, be, false)) :- "[]"(not, "()"(_13))
No match for clause.
Done with goal!

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: #3000228
Snippet name: Answer for stefanreich (>> log)
Eternal ID of this version: #3000228/1
Text MD5: 84b1d67f8c2f70fc6ba7403f620f162b
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-06 02:37:30
Source code size: 6386 bytes / 72 lines
Pitched / IR pitched: No / No
Views / Downloads: 486 / 131
Referenced in: #3000382 - Answer for ferdie (>> t = 1, f = 0)
#3000383 - Answer for funkoverflow (>> t=1, f=0 okay)