The following expression shows the truth table for each of the 16 primitive Boolean operations:
(0 b./; 1 b./; 2 b./; 3 b./; 4 b./; 5 b./; 6 b./; 7 b./; 8 b./; 9 b./; 10 b./; 11 b./; 12 b./; 13 b./; 14 b./; 15 b./) ~ i.2
βββββ¬ββββ¬ββββ¬ββββ¬ββββ¬ββββ¬ββββ¬ββββ¬ββββ¬ββββ¬ββββ¬ββββ¬ββββ¬ββββ¬ββββ¬ββββ
β0 0β0 0β0 0β0 0β0 1β0 1β0 1β0 1β1 0β1 0β1 0β1 0β1 1β1 1β1 1β1 1β
β0 0β0 1β1 0β1 1β0 0β0 1β1 0β1 1β0 0β0 1β1 0β1 1β0 0β0 1β1 0β1 1β
βββββ΄ββββ΄ββββ΄ββββ΄ββββ΄ββββ΄ββββ΄ββββ΄ββββ΄ββββ΄ββββ΄ββββ΄ββββ΄ββββ΄ββββ΄ββββ
How can I reorganize a part in parentheses to remove duplication?
lightening
The goal here is not to create a table, but to learn how to generate new verbs dynamically. To reduce the expression in brackets, I would like to separate the characters ;, /and b., and then replace the numbers with i.10.
The symbol is ;quite simple:
;/i.16
βββ¬ββ¬ββ¬ββ¬ββ¬ββ¬ββ¬ββ¬ββ¬ββ¬βββ¬βββ¬βββ¬βββ¬βββ¬βββ
β0β1β2β3β4β5β6β7β8β9β10β11β12β13β14β15β
βββ΄ββ΄ββ΄ββ΄ββ΄ββ΄ββ΄ββ΄ββ΄ββ΄βββ΄βββ΄βββ΄βββ΄βββ΄βββ
But itβs hard for me to find a way to create a new verb from each element in the list.
I think maybe I'm looking for some kind of higher-order processors, which allow you to use &and @with something other than the constant.
, nn leftBondEach v n0 & v; n1 & v; ... ; nn & v:
bverbs =: (i.16)(leftBondEach)b. NB. would mean (0 b.; 1 b.; ...; 15 b.)
0 bverbs 0
βββ¬ββ¬ββ¬ββ¬ββ¬ββ¬ββ¬ββ¬ββ¬ββ¬ββ¬ββ¬ββ¬ββ¬ββ¬ββ
β0β0β0β0β0β0β0β0β1β1β1β1β1β1β1β1β
βββ΄ββ΄ββ΄ββ΄ββ΄ββ΄ββ΄ββ΄ββ΄ββ΄ββ΄ββ΄ββ΄ββ΄ββ΄ββ
0 bverbs 1
βββ¬ββ¬ββ¬ββ¬ββ¬ββ¬ββ¬ββ¬ββ¬ββ¬ββ¬ββ¬ββ¬ββ¬ββ¬ββ
β0β0β0β0β1β1β1β1β0β0β0β0β1β1β1β1β
βββ΄ββ΄ββ΄ββ΄ββ΄ββ΄ββ΄ββ΄ββ΄ββ΄ββ΄ββ΄ββ΄ββ΄ββ΄ββ
, - , / .
, J, , , , .:)