Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
12
Task/Gray-code/Ursala/gray-code.ursala
Normal file
12
Task/Gray-code/Ursala/gray-code.ursala
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#import std
|
||||
#import nat
|
||||
|
||||
xor = ~&Y&& not ~&B # either and not both
|
||||
|
||||
btog = xor*+ zipp0@iitBX # map xor over the argument zipped with its shift
|
||||
|
||||
gtob = ~&y+ =><0> ^C/xor@lrhPX ~&r # fold xor over the next input with previous output
|
||||
|
||||
#show+
|
||||
|
||||
test = mat` * 2-$'01'***K7xSS pad0*K7 <.~&,btog,gtob+ btog>* iota32
|
||||
Loading…
Add table
Add a link
Reference in a new issue