Libraryless. Click here for Pure Java version (1539L/10K/33K).
!752 static new Prolog p; static void test(Lisp l) { print(l + " => " + p.canSolve(l)); } p { p.addClause(lisp("yes")); test(lisp("yes")); test(lisp("no")); // Test native test(lisp("nativeTest")); test(lisp("isQuoted", "x")); test(lisp("isQuoted", "A")); test(lisp("isQuoted", "\"hello\"")); test(lisp("isQuoted", "\"hello\"", "\"hello\"")); // will fail (2 args instead of 1) }
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1002827 |
Snippet name: | Test class Prolog (including native stuff) |
Eternal ID of this version: | #1002827/1 |
Text MD5: | 3e9b7d37d760717e1b036a0cf431ce50 |
Transpilation MD5: | e7c61ae6cc9fffb75ae5f5f4da32762a |
Author: | stefan |
Category: | javax |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-02-29 04:24:27 |
Source code size: | 432 bytes / 22 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 628 / 633 |
Referenced in: | #1002828 - Test class Prolog 2 (X=X) #3000382 - Answer for ferdie (>> t = 1, f = 0) #3000383 - Answer for funkoverflow (>> t=1, f=0 okay) |