Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
21
Task/Run-length-encoding/Bracmat/run-length-encoding.bracmat
Normal file
21
Task/Run-length-encoding/Bracmat/run-length-encoding.bracmat
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
( run-length
|
||||
= character otherCharacter acc begin end
|
||||
. :?acc
|
||||
& 0:?begin
|
||||
& @( !arg
|
||||
: ?
|
||||
[!begin
|
||||
%@?character
|
||||
?
|
||||
[?end
|
||||
( (%@:~!character:?otherCharacter) ?
|
||||
& !acc !end+-1*!begin !character:?acc
|
||||
& !otherCharacter:?character
|
||||
& !end:?begin
|
||||
& ~`
|
||||
| &!acc !end+-1*!begin !character:?acc
|
||||
)
|
||||
)
|
||||
& str$!acc
|
||||
)
|
||||
& run-length$WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWBWWWWWWWWWWWWWW
|
||||
Loading…
Add table
Add a link
Reference in a new issue