Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
25
Task/Ternary-logic/PicoLisp/ternary-logic-1.l
Normal file
25
Task/Ternary-logic/PicoLisp/ternary-logic-1.l
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
(de 3not (A)
|
||||
(or (=0 A) (not A)) )
|
||||
|
||||
(de 3and (A B)
|
||||
(cond
|
||||
((=T A) B)
|
||||
((=0 A) (and B 0)) ) )
|
||||
|
||||
(de 3or (A B)
|
||||
(cond
|
||||
((=T A) T)
|
||||
((=0 A) (or (=T B) 0))
|
||||
(T B) ) )
|
||||
|
||||
(de 3impl (A B)
|
||||
(cond
|
||||
((=T A) B)
|
||||
((=0 A) (or (=T B) 0))
|
||||
(T T) ) )
|
||||
|
||||
(de 3equiv (A B)
|
||||
(cond
|
||||
((=T A) B)
|
||||
((=0 A) 0)
|
||||
(T (3not B)) ) )
|
||||
7
Task/Ternary-logic/PicoLisp/ternary-logic-2.l
Normal file
7
Task/Ternary-logic/PicoLisp/ternary-logic-2.l
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
(for X '(T 0 NIL)
|
||||
(println 'not X '-> (3not X)) )
|
||||
|
||||
(for Fun '((and . 3and) (or . 3or) (implies . 3impl) (equivalent . 3equiv))
|
||||
(for X '(T 0 NIL)
|
||||
(for Y '(T 0 NIL)
|
||||
(println X (car Fun) Y '-> ((cdr Fun) X Y)) ) ) )
|
||||
Loading…
Add table
Add a link
Reference in a new issue