Libraryless. Click here for Pure Java version (1539L/10K/33K).
1 | !752 |
2 | |
3 | static new Prolog p; |
4 | |
5 | static void test(Lisp l) { |
6 | print(l + " => " + p.canSolve(l)); |
7 | } |
8 | |
9 | p { |
10 | p.addClause(lisp("yes")); |
11 | |
12 | test(lisp("yes")); |
13 | test(lisp("no")); |
14 | |
15 | // Test native |
16 | |
17 | test(lisp("nativeTest")); |
18 | test(lisp("isQuoted", "x")); |
19 | test(lisp("isQuoted", "A")); |
20 | test(lisp("isQuoted", "\"hello\"")); |
21 | test(lisp("isQuoted", "\"hello\"", "\"hello\"")); // will fail (2 args instead of 1) |
22 | } |
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: | 627 / 633 |
Referenced in: | [show references] |