March 2014 update
This commit is contained in:
parent
09687c4926
commit
a25938f123
1846 changed files with 21876 additions and 5203 deletions
27
Task/Logical-operations/Bracmat/logical-operations.bracmat
Normal file
27
Task/Logical-operations/Bracmat/logical-operations.bracmat
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
( ( 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$(~,~))
|
||||
);
|
||||
6
Task/Logical-operations/Deja-Vu/logical-operations.djv
Normal file
6
Task/Logical-operations/Deja-Vu/logical-operations.djv
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
showbool a b:
|
||||
!.( a b or a b and a b xor a b not a )
|
||||
|
||||
for a in [ false true ]:
|
||||
for b in [ false true ]:
|
||||
showbool a b
|
||||
6
Task/Logical-operations/Maple/logical-operations.maple
Normal file
6
Task/Logical-operations/Maple/logical-operations.maple
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
f:=proc(a,b) a and b, a or b, not a; end proc:
|
||||
|
||||
f(true,true);
|
||||
f(true,false);
|
||||
f(false,true);
|
||||
f(false,false);
|
||||
|
|
@ -4,3 +4,4 @@
|
|||
<fo:block>a and b = <xsl:value-of select="$a and $b"/></fo:block>
|
||||
<fo:block>a or b = <xsl:value-of select="$a or $b"/></fo:block>
|
||||
<fo:block>not a = <xsl:value-of select="not($a)"/></fo:block>
|
||||
</xsl:template>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue