Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
7
Task/Truth-table/J/truth-table-1.j
Normal file
7
Task/Truth-table/J/truth-table-1.j
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
truthTable=:3 :0
|
||||
assert. -. 1 e. 'data expr names table' e.&;: y
|
||||
names=. ~. (#~ _1 <: nc) ;:expr=. y
|
||||
data=. #:i.2^#names
|
||||
(names)=. |:data
|
||||
(' ',;:inv names,<expr),(1+#@>names,<expr)":data,.".expr
|
||||
)
|
||||
32
Task/Truth-table/J/truth-table-2.j
Normal file
32
Task/Truth-table/J/truth-table-2.j
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
truthTable '-.b'
|
||||
b -.b
|
||||
0 1
|
||||
1 0
|
||||
truthTable 'a*b'
|
||||
a b a*b
|
||||
0 0 0
|
||||
0 1 0
|
||||
1 0 0
|
||||
1 1 1
|
||||
truthTable 'a+.b'
|
||||
a b a+.b
|
||||
0 0 0
|
||||
0 1 1
|
||||
1 0 1
|
||||
1 1 1
|
||||
truthTable 'a<:b'
|
||||
a b a<:b
|
||||
0 0 1
|
||||
0 1 1
|
||||
1 0 0
|
||||
1 1 1
|
||||
truthTable '(a*bc)+.d'
|
||||
a bc d (a*bc)+.d
|
||||
0 0 0 0
|
||||
0 0 1 1
|
||||
0 1 0 0
|
||||
0 1 1 1
|
||||
1 0 0 0
|
||||
1 0 1 1
|
||||
1 1 0 1
|
||||
1 1 1 1
|
||||
Loading…
Add table
Add a link
Reference in a new issue