Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
36
Task/Rep-string/Bracmat/rep-string.bracmat
Normal file
36
Task/Rep-string/Bracmat/rep-string.bracmat
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
( ( rep-string
|
||||
= reps L x y
|
||||
. ( reps
|
||||
= x y z
|
||||
. !arg:(?x.?y)
|
||||
& ( @(!y:!x ?z)&reps$(!x.!z)
|
||||
| @(!x:!y ?)
|
||||
)
|
||||
)
|
||||
& ( :?L
|
||||
& @( !arg
|
||||
: %?x
|
||||
!x
|
||||
( ?y
|
||||
& reps$(!x.!y)
|
||||
& !x !L:?L
|
||||
& ~
|
||||
)
|
||||
)
|
||||
| !L:
|
||||
& out$(str$(!arg " is not a rep-string"))
|
||||
| out$(!arg ":" !L)
|
||||
)
|
||||
)
|
||||
& rep-string$1001110011
|
||||
& rep-string$1110111011
|
||||
& rep-string$0010010010
|
||||
& rep-string$1010101010
|
||||
& rep-string$1111111111
|
||||
& rep-string$0100101101
|
||||
& rep-string$0100100
|
||||
& rep-string$101
|
||||
& rep-string$11
|
||||
& rep-string$00
|
||||
& rep-string$1
|
||||
);
|
||||
Loading…
Add table
Add a link
Reference in a new issue