Libraryless. Click here for Pure Java version (2567L/16K).
1 | static BasicLogicRule curryLHS_BasicLogicRule(BasicLogicRule rule) { |
2 | if (rule == null) null; |
3 | while licensed { |
4 | O lhs = rule.lhs; |
5 | if lhs is And(O a, O b) { |
6 | BasicLogicRule r = rule; |
7 | rule = new BasicLogicRule(a, curryLHS(new BasicLogicRule(b, rule.rhs))); |
8 | rule.trail = r.trail; |
9 | } else break; |
10 | } |
11 | ret rule; |
12 | } |
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1027875 |
Snippet name: | curryLHS_BasicLogicRule - convert And on lhs to nested logic rule on rhs |
Eternal ID of this version: | #1027875/2 |
Text MD5: | 52a4c94c2b151a32d135500e70fcf35c |
Transpilation MD5: | b29a7fe62fb445440488c8d0f9856444 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-04-18 11:33:42 |
Source code size: | 350 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 244 / 353 |
Version history: | 1 change(s) |
Referenced in: | [show references] |