March 2014 update

This commit is contained in:
Ingy döt Net 2014-04-02 16:56:35 +00:00
parent 09687c4926
commit a25938f123
1846 changed files with 21876 additions and 5203 deletions

View 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$(~,~))
);

View 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

View 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);

View file

@ -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>