RosettaCodeData/Task/Logical-operations/Bracmat/logical-operations.bracmat
2014-04-02 16:56:35 +00:00

27 lines
501 B
Text

( ( Logic
= x y
. '$arg:(=?x,?y)
& str
$ ( "\n(x,y)="
!arg
( ":\n"
"x and y -> "
( (!x&!y)&true
| false
)
)
( \n
"x or y -> "
( (!x|!y)&true
| false
)
)
"\nnot x -> "
(~!x&true|false)
)
)
& out$(Logic$(,))
& out$(Logic$(~,))
& out$(Logic$(,~))
& out$(Logic$(~,~))
);